Not sure your reason for insisting on returning to Thailand. The IO have smelled a rat in your intention meaning the visa you had applied for and your last method of coming to Thailand does not satisfy their requirement to allow you entry. Was it that the IO was in a bad mood, can’t say but it is what it is.