The personal antagonism between Schultz and Richard Pace is obvious from the beginning of the movie due to the heavy implication that Pace previously slept with Schultz's wife. Schultz therefore has a vendetta against Pace, and Pace reciprocates the rivalry by humiliating Schultz whenever possible. This motivation explains the reasoning behind the numerous outlandish diversions and red herrings during the robbery.
First, by giving the entire prison population food poisoning, the team causes hundreds of inmates to suffer intense vomiting and diarrhea. This throws the institution into chaos, and allows the robbers to take advantage of the distracted staff during the pandemonium. However, for Pace, the health of the convicts is simply a means to an end. When Wick expresses concern about their well-being and remarks, "I hope there's no horrible side effects," Pace heartlessly shrugs and responds, "This should be the worst." No matter the collateral damage, Pace's main objective was to embarrass Schultz in his own facility — something that a cavalcade of spewing bodily fluids is sure to do.
Secondly, it's eventually revealed that the gold bars weren't transported as bricks, but instead melted down into the shape of a statue. While Schultz's team chases after a van they presume is carrying the riches, the real gold is wheeled out of the facility under the pretense of repairing the sculpture. This means Schultz is further disgraced when he catches up to the van, only to find it empty.