Tang San's test and trial at the end, was first because he was angry - Yuhao was meant to succeed Tang San and become the new Poseidon, but was snatched away by the god of emotions.
Secondly, Yuhao was with Wutong, and Tang San is ridiculously protective.
Third, the pressure in the trials forced Yuhao to finish integrating with the god powers. Just like his other abilities and power ups (yin-yang soul nucleus, ultimate ice element, etc), they were not fully integrated when he obtained them, rather the pressure he is put under from harsh combat forces his body to quickly adapt and finish integrating them.