Do the Shallow Water Equations produce 2d vorticity/eddies? Why/Why not? My understanding so far: given a small flow moving forward within a larger stationary body of water, the water ahead would pile up, creating hydrostatic pressure in all 2d directions (and thus acceleration), including to the sides. Wouldn't this side acceleration result in rotation, i.e. eddies or 2d vorticity?
But in my simulation code, no vorticity arises. (Of course, my code might be buggy.)
My understanding of the Shallow Water Equations and algorithm come from chapter 12 "Shallow Water" in Bridson's Fluid Simulation for Computer Graphics (whole chapter is available in the free preview)
Ideally, I'd like both a physical intuition and a mathematical understanding of this.
 A: Good Question. But I need to clarify few aspects first; You talk about the eddies apparently because the comments given to your question, but your question rather talks about braking waves on a shore of a kind of "vorticity". -> eddy is a wrong word to me in this context as the wave breaks at the point where the eddy should be created.
Newertheless this question of yours can be simplified to;
"water would pile up, creating hydrostatic pressure in all 2d directions (and thus acceleration), including to the sides. Wouldn't this side acceleration result in rotation"
And this definitely is true; They are even called as a "rolling waves" or "roll waves" because of this rotational character. Simply googling the latter even gives a lot of pictures for the issue. This linked publication "Dynamics of roll waves" also describes better the relation to equation $c^2=gd$ on page 182 in the question linked book "Fluid Simulation for Computer" as this is simply the Froude Number $Fr=1$. 
At this speed there will be no rolling in the waves. The waves are created only because the external field (ie. gravity) produces a certain flow velocity $V$, which requires a certain flow depth $y$, and as $Q=V*A$ these all can be satisfied with only certain Flow $Q$, it means that the any Q less will produce wave a like flow, but without any rolling, as at this case the fluid particles are moving similarily like when you walk on conveyort belt. 
In reality this kind of flow is only possible in mild slops and low velocities, like the rain water flowing on the pavement, as with greater slopes and bigger water depth the velocities will quickly run above $Fr=1$ 
This bigger scale rolling starts then exactly at $Fr=\sqrt3$.
So I expect your bug has been the simulation running below this limiting speed. 
Please note that you might not find this exact explanation above from any textbooks, as this provides simultaneously the solution to Navier Stokes Existency & Smoothness problem, as I have explained it here.  
