I see the need to keep sides relatively/somewhat even as overwhelmingly more important than stacking a certain side because that is the one you want to play on. It matters not if some of your friends are on that side.
Besides, in a situation like that, do you (those that play only one side) think it is fair to overwhelm the other side with more players like that? Is it really fun to play with that much less of a challenge because you outnumber them?
I do not really think that what I did is unfair. Since in my case it involed only one friend. I could join where I want because of my connection. The friend had to use the glitch. By the time he had joined and selected his role teams were evened up anyway. Battlefield commissions - a game feature - are a lot worse that that.
I agree that keeping the game even is much more important than playing together.
But because playing together is much more fun than playing alone, why not implement a feature like queuing that allows both balance AND teamwork?