I suspect they just did not like your location based on what they seek themselves in what a suitable home should be based on simple criteria. Studies have shown bees prefer the following:
* prefer a swarm trap (colony location) about 8 to 15 feet off the ground.
* will disregard a trap with light coming in from above.
* prefer a trap equivalent to a cavity size slightly larger than a deep brood
* will select sites in the afternoon shade. They may abandon a site within a
few days if in full sun and heat is an issue.
* prefer bait hives with entrances facing south.
* prefer a entrance towards the bottom of the cavity.
* prefer a unobstructed flight path from the entrance.
* will not take up residence in a bait hive that has other insects in them.
Keep them free of wasps, yellow jackets, etc.
* prefer a bait hive that is dry.
* prefer a previously used site that has a honey bee smell of old comb, or
one that has baited with bee scent.
So it is easy to understand sometimes when a captured swarm just gets up and leaves. I'm surprised they actually stayed 4 days. If they are going to leave, they usually do it sooner.
I suspect the heat of the hive on the roof may of played into it. In the future you can capture and cage the queen, use queen excluders, or entice them to stay with a frame of brood once you have a hive up and running.