Regarding Silva's clowning - or degrees thereof - it's to serve a purpose as Riv said.

Silva wasn't as theatrical with Okami because Okami is nowhere near the striker that Weidman is. He shuffled in against Silva throwing the same robotic step-jab with zero head movement the engire fight. This gave Silva control of the range and also allowed him to predict what Okami would do and against a killer like Silva that is all he needed. So there was no need to ramp the clowning into overdrive as Okami had already handed him what he wanted.
Sure, there were the gestures to remind Okami that he had no business being in there with him, to sow fear and doubt and make him even more tentative but Silva had him right where he wanted him before he even stepped in the cage.

Weidman didn't do that. He showed zero fear of Silva from the get-go and closed the range intelligently using feints, sharp footwork and strikes thrown with intent. He wrested control of range from Silva early on and refused to relinquish it. When Silva clowned him him he didn't take the bait and stuck to his gameplan. Silva clowned harder. Weidman still didn't bite. Silva ramped it up to 11 because not because he was careless or arrogant but because nothing other than leg kicks were landing. Weidman then set a trap that
not only used Silva's freakish reflexes against him, but a trap that literally would not work against any other middleweight competing at the time. The trap worked and he got the TKO.

The Bonnar fight is a good example of Silva clowning for a purpose. If you watch that fight again Bonnar has him pinned up against the cage early, and lands a nasty elbow to Silva's ear that visibly hurts him. From that point onwards Silva starts the mind games, the refusing to move away from the fence, the seemingly arrogant absorption of the 1-2-3 that Bonnar throws in every fight. You can see this freeze Bonnar up, he becomes tentative and Silva merks him.

If you want to know why Silv clowns to the degree he does in a given fight, look at what his opponent is doing. Are there opportunities there to counter-strike? Are they looking flustered? How close are they to breaking mentally?

its not a 1-clown-fits-all deal (1x swear in Portugese followed by 2x booty-shakes and a Matrix dodge) but a tactic that is used as the situation dictates.