Why didn’t Russia take all of Georgia, instead of merely South Ossetia?
Because by taking only parts of countries, like South Ossetia, Transnistra or the Donbas, then freezing in the conflict, russia prevents Georgia, Moldova and Ukraine, respectively from joining the EU and/or NATO, and thus finally freeing themselves fully from russia, their historic colonial overlord, without having to expend the resources to subjugate and pacify those entire nations completely and turning them into new Afghanistans for itself. Just turns out the Ukrainians got sick of being pushed around, and punched the bully back.