There is a rule that covers this:
6.02
(a) The batter shall take his position in the batter’s box promptly when it is his time at bat.
(b) The batter shall not leave his position in the batter’s box after the pitcher comes to Set Position, or starts his windup. PENALTY: If the pitcher pitches, the umpire shall call “Ball” or “Strike,” as the case may be.
(c) If the batter refuses to take his position in the batter’s box during his time at bat, the umpire shall call a strike on the batter. The ball is dead, and no runners may advance. After the penalty, the batter may take his proper position and the regular ball and strike count shall continue. If the batter does not take his proper position before three strikes have been called, the batter shall be declared out.
How about that - the ump got it right!
I wish they'd do more of this rather than let the players go on and on and on.