While it is difficult to completely eliminate swarming, every beekeeper should work to reduce the possibility of swarming in hives that he or she manages.
Preventing swarms is good for your own colonies: When your hive swarms, the old colony could be left without a queen. At best, the colony will be weaker. Because of the loss of foragers that go with the swarm, the hive will be less productive until it builds back up.
What’s more important is that swarms of bees can be seen as a nuisance by neighbors, leading to complaints and potential regulations against urban beekeeping. Swarms sometimes settle in attics or the walls of buildings, requiring costly removal.
There is plenty of good information about swarm prevention available online. Here are a few helpful links:
Swarm Prevention (by Michael Bush)
What’s So Bad About Swarming (Beesource)
How to Prevent Swarming (Dummies)
7 Swarm Prevention Tips (Keeping Backyard Bees)