They have some criteria to exclude people from the bad lottery (disabled people and their care takers, unaccompanied minors), and then may apply a ranking based on booking class, frequent flyer status, and check-in time.
But here, the claim is that pax were chosen randomly.
Many people have good reasons to be on a plane, and this passenger being a doctor should not have any bearing on the resolution of the problem at hand (except insofar as it should've compelled other pax to take the 800 USD and hotel room and volunteer for disembarkation).
Even if most of us think our needs (/convenience) is more important than everyone else, most of us also appreciate the role that doctors & nurses play.
Plus, airlines have rules about literally everything-including wearing leggings. From both a business and a public safety perspective, it would hardly be shocking if an airline mandated that doctors and nurses should be either exempt from removal or the last to be removed. Not sure if you've ever been on a plane where someone has had a serious medical issue when there hasn't been a doctor or nurse on board, but its hardly uncommon. Having a doctor on board decreases risk for an airline--keeping doctors & nurses aboard certainly makes more senses than random choice does or choosing whomever paid the least.
And we're entitled to roast them for doing so when we think they've done wrong.