To figure it out, you have to remember what caused AMC/Jeep to build the YJ at all. They were happily selling all the CJs they could build. However, some kid took a new CJ with a "roll" (show) bar on it and a load of his buddies, and went out in a field to show off how neat it was to get air under the thing. Needless to say, it flipped, crushed the "roll" bar, and IIRC killed one kid and created a couple of vegetables.
In the great American tradition, the families sued AMC on the grounds that (a) the design was unsafe because the vehicle rolled over, and (b) the vehicle was unsafe because the "roll" bar didn't save their poor innocent kids.
AMC lost the lawsuit -- and that was the death knell for the CJ. The YJ design was intended more to be stable and un-rollable (if that's not a word I just made it up) than to be off-road capable. Thus, although track bars are probably not absolutely necessary with leaf springs, they do remove some lateral movement, and that makes the vehicle just a bit more stable and predictable in cornering.
Now you know.