Because males are simply better fighters also it's a kids show so it won't break the gender roles for a while.
One thing to remind people of is that the the E.U.P guard had several females among its founders. (Including General Firefly, yay!!! Also Admiral Fairy Flight, and Commander Easyglider. Possibly General Flash or Admiral Fairweather may have been as well but it isn't clear what gender they were. Colonel Purple Dart seems to have been male.) I think it's specifically the Royal Guards that are mostly male. Also MLP frequently breaks other gender roles (to the person who said a kids show wouldn't. I can give examples if you want). I'm guessing the royal guard being mostly male is left over from some old tradition like the royal Canterlot voice. That or legitimately just to be a juxtaposition to the princesses at public events.. I mean Luna had to track down a bunch of bat ponies I'm pretty having a uniform from for public displays is a big part of it. Also (to the comment that the guards do nothing) we've seen that they have protocol for keeping unwanted visitors out at rough times, but they just don't work well if the thing you are trying to keep out can disguise themselves perfectly as people who should have clearance. Also, if someone doesn't know why it's awesome that general Firefly was one of the first founders of the E.U.P I'd be glad to explain ^_^ Additionally, though not a beneficial comment, Twilight looked adorable in Commander Easyglider's jacket:
Perhaps it's more of an honor guard than an actual service? Royalty loves (or is expected) to stand on ceremony, after all. Besides, the princesses have shown, time after time, that they are more than capable of self defense. What else could the guards be other than a quiet display of power?