That only seems like a miracle because you need to do more research into what Crimea actually is.
Crimea was never actually part of Ukraine, only a paper "gift" to Ukranian SSR way back when, negligible amounts of ethnic Ukrainians live there. Nearly the entire jurisdiction is employed supporting the mostly russian tourist industry, or actual russian military, their Black Sea fleet.
There were simply no other outcomes possible. It was a defacto Russian territory, with a token Ukranian security force against an entire Russian Black Sea fleet, and tens of thousands sailors and marines. It seems that even Ukraine itself didn't wholeheartedly consider Crimea it's own territory, essentially no resistance whatsoever.