This varies by the grade in our school (each grade is "team taught" so the team of teachers for that grade decides these things, I think). Our fifth grade teaching team does not allow birthday treats to be brought in this year, and that's fine with me. I think it eliminates a lot of unnecessary calories and sugaring up the kids, not to mention that it's distracting and takes up class time that is very tight in our school day. I think some teachers also appreciate a lack of treats being available -- because the kids always take treats to other teachers, the librarian, the "specials" teachers, and I know some of them say they hate to say no to a kid offering a birthday treat, but the teachers don't really want the extra calories for themselves!
Here's one reason not to do treats: Does your cafeteria have a strict no-food-sharing policy? Ours does -- kids quickly get cracked down on (made to sit solo at the silent table) if they share any food from their lunches or take food from another kid's lunch. This is done to prevent any possible allergic reactions, complaints from parents, trades of food that turn into issues, etc. Well, if the school bans any food sharing at lunch or regular snack time, then it should be consistent and ban it for birthday treats as well, for the same reasons.
Of course, as I type this, my daughter has asked me to bring in treats (not birthday, just because she can) for the school TV station crew next week....which the faculty adviser allows for the TV crew at times! So it's never perfectly consistent. But I'd rather my kid have a little access to treats for the few weeks she's on the TV crew than treats coming at her 32 different times each school year in the classroom.
By the way, we do not eliminate ALL outside food. Class parties still have food that the room parents and other parents coordinate and provide potluck style (pizza with carrots and grapes, or healthy sandwiches and fruit etc.). But it has to be for a coordinated party like the holiday party or the spring party. And the adults choose it and bring it in. And we all endeavor to have the sweets limited.