That is a good question. You definitely get increased crop yield with a pollinator close by. Perhaps check with the organizer of the community garden and find out their reasons. There maybe restrictions from the town...
I think it's just that so few folks have been into beekeeping, which is just starting what I hope will be a boom cycle among home & town gardeners.
Talk to whoever coordinates your local community gardens; the odds are pretty high that either no one has actually thought about it, or knew how to begin.
There may be some concern in an urban shared garden space about sting allergies; the community garden may want to make sure there's sting shock kits freely available, or consider no-sting (but alas also not honey-producing) types of bees, like Mason or Carpenter Bees.
Definitely worth a conversation or three!