I recall when they started asking for boarding pass stubs years ago when BKK was newly opened and it being reportedly due to some nefarious foreigners simply slipping into the air-side after checking out of the country, lurking there for a few hours, and then re-entering without actually leaving the country. Maybe that was a cheaper option than a burned AirAsia r/t to Cambodia? Who knows? Anyway, that was before the ICQ (?) channels were enabled to make sure those who had come from Thailand's other international airports and truly were in 'international' transit didn't clog up the BKK and DMK immigration lines when they didn't need to.
I agree that most countries don't and probably, with better immigration and security in place, BKK and DMK doesn't need to do it either, but you know that old habits die hard in this enchanted realm.