There are laws for pretty much everything that you would ever need a law for. That holds true when it comes to bee keepers and their swarms.
Germany, at least, has some very specific laws on what to do with a swarm that flees its keep.
If a swarm flies away and they go to someone else's property, who now owns the bees? That depends on a few things.
Bees aren't considered completely domesticated, so, like most captures wild animals, if they get away they are once again considered wild and without ownership.
With bees, though, there is a bit of an exception. If you immediately, and without undue delay, pursue your swarm, you can still claim ownership of them. If they end up on someone else's property, you have the right to go onto the property and take your bees back.
There's yet another exception to this, though. If the bees decide to make a home out of an already inhabited hive on that land, then the owner of the property takes ownership of the migrant bees. This makes sense, as it would be nearly impossible to separate the two swarms after they have merged.
If two or more swarms fly away and merge, then the two owners split ownership of the new, combined swarm.
These are pretty specific laws that are probably not used very often, if ever, but it's good to be prepared, right?