@David *******
requirements are indeed based on Thai law, but the airline has the obligation to check these requirements according their treaty with Thailand that gives them the possibility to fly to Thailand.
That means that in case a passenger does not have any valid visa for Thailand, they have to check requirements for visa exempt.
Besides nationality this is proof of onward transport within the period of visa exempt.
When you have a return flight, they do not have to ask you anything, because they can see themselves.
And as with all checks, don't expect 100 percent of passenger checked.