Yes it's law but they hardly ever do ask. The best and quickest way to actually pass immigration without hassle is to obtain and pay for your visa at a Thai embassy in your home country. A tourist visa can now be obtained online when any and all criteria is asked allowing you to cruise though in Thailand because all relevant questions have already been satisfied before you arrive.
Many years ago I had a similar situation. Emirates had a hotel in Dubai which I used so was issued with as temp pass as long as I used the hotel. Ask Emirates is best idea.....things may of changed now though.