OK my experience is with travel to Philippines not Thailand recently. It is not the immigration who ask for onward ticket necessarily but the airline may refuse boarding. Twice I have had to explain at check-in that my visa allows indefinite stay. Just returned here after a short holiday in UK of course had ticket for flight here only. Woman at check-in asked how long I intended to stay I said a few years. She was taken aback till I showed and explained my visa. When I came in first time I searched the net to find the cheapest flight out to anywhere. 14gbp to Hong-Kong on a special deal
TBH - and I don't know if he was breaching visa/employment rules then or before - it is people playing fast and loose with the visa rules who cause the problems for everyone else.
This advice is very valid, not just for Thai consulates but for any official building. All Philippine Immigration offices etc. have dress code signage and will just refuse to serve anyone inappropriately dressed. I was at The Philippines Retirement Agency offices a couple of weeks ago to submit my visa application, and the front desk will not even let you past to go to the lifts to the agency offices if you are not appropriately dressed.
It makes so much sense, you are going to apply for permission to be in their country for an extended period of time, surely you want to give the impression that you are the sort of person they want in their country