It is obvious that the immigration officer had the impression that you “live” for prolonged periods of time in Thailand on visa exemption entries, and that for a number of years. Unfortunately, entry into Thailand is up to the discretion of the immigration officer, even if all rules are followed. Another officer/airport, it might have been totally different. For safety sake I would recommend to get an appropriate visa, even if you want to stay only for 2 month or so.