My rule of thumb is, nobody works for the buyer or the seller. They work for the sale, because the sale is what pays their commission.
The inspector is working for the sale, but indirectly.
One house that my family sold, the inspector showed up at the appointed time, and mentioned that he was the buyer broker's brother. He didn't find any problems with the house.
Don't they have any legal liability if they miss something obvious?
I had a friend who had a house with termite issues that 2 inspectors missed. He tried to get lawyers involved and they all told him he had absolutely no resource besides the inspection fees, which would have been swamped by lawyer fees anyways.
He ended up ripping out all the drywall to repair the termite damage bit by bit.
If the realtor pays the opposite happens.