Hortensio's search for a wealthy wife is understandable, it's driven by his lust of the power
and a status he had before. Hortensio once was a wealthy young man with a respected status, his father left him a great inheritance and the family business in his will, but Hortensio was naive and he lost everything in a couple of bad investments. Now Hortensio is desperate and needs to find someone who can support him before his status is completely destroyed. This leads Hortensio to marry anyone that has wealth and his search for love is a mask for this search.
I believe Hortensio's purpose in the play is to show what Petruchio’s outcome would have been if he couldn’t tame Katherina. When Hortensio marries he goes to Petruchio to learn how to tame his wife. This is why he is in the “ sun/moon?” scene, he is trying to learn from Petruchio. Petruchio manages to tame Katherina while Hortensio ends up not taming the widow. You can see this at the very end of the play when the widow doesn’t listen to Hortensio and is also dominating over him.
In this scene, the “sun/moon?” scene, Hortensio is there to observe Petruchio’s attempts to tame Katherina. He is there to educate himself at Petruchio’s “taming school” and to support Petruchio. When Katherina objects to Petruchio, Hortensio gives her a hint that she should comply with Petruchio. After this Katherina seems to subject herself to Petruchio, and Hortensio is there to witness it and reacts with excitement and congratulations to Petruchio.