It is not the airlines (which you refer to as "flying companies") that say that you "cant have a 5 month holiday in Thailand on a visa exempt with a return ticket"
It was the Thai government who, with the Announcement of the Ministry of Interior dated 15 June 2024 which was published in Thai language in the Royal Gazette, said when you enter Thailand without a visa you are allowed to stay for up to sixty days for the purpose of "tourism, work, or short-term business engagements". It further says that if you wish to remain in Thailand temporarily beyond the period permitted under this Announcement, you must apply for an extension of stay at the Immigration Office before the expiration of the permitted period. The Announcement makes no mention of a return flight.
Based on the abovementioned Announcement, the IATA entered relevant information in their database which is accessible free of charge and when I consulted it just now displayed the following:
When checking in passengers for flights to Thailand, the staff of airlines who subscribe to a specific IATA service package get analogous information displayed on their screens. Airlines are completely free to chose whether and when and to what extent to apply conditions or restrictions upon any passenger who has no return or onward ticket.