Just because the Chiefs could have kept him, doesn't mean they wanted to do so at the cost. Then of course there was the compensation headed back to them that helps making that decision as well.
The Chiefs have a QB on a massive contract as well as a handful of others with very large cap hits, Miami doesn't have that QB contract currently. I didn't mean the cap is non-existent, but for a lot of these large contracts you can still maneuver around to do what you need to do.