This used to be much more common before AA upgraded the engines on its MD80s (I believe from the JT8D-217 to the JT8D-219). Weight restrictions out of LGA on longer MD80 flights used to be pretty common, weight restrictions and/or the occasional fuel stop in places like BNA/MEM. Since OP's flight diverted to STL, which is a little off the normal LGA-DFW route (PARKE J6 LIT BYP DFW), I would guess that hot temperatures at takeoff combined with a heavy pax/bags load and a circuitous northerly route to make the STL stop necessary.
The -219 engine has more oomph (technical term there!) but at 7000' LGA still is pretty short as runways go.