There is some manner of balance, I've never seen a game with 3 healers or tanks on one side and only one or none on the other, you'll usually end up with 1:1, 1:2, 2:2, 2:3 etc. Same for melees:ranged.
When there is an odd amount of a role in the whole game, then you generally end up with one more on one team because obviously you can't split them in half.
My problem is that the modicum of balance we currently have in the system is not enough, and gets skewed heavily by hybrid jobs that it likes considering as full melees or full ranged, where you suddenly end up with lopsided comps that it supposedly tries to avoid otherwise.