Anonymous participant I know most people got theirs legitimately like you did. But unfortunately Immigration has no way of knowing this. And can tar you with the same brush.
When he asked you what you're doing and heard the word seminar he definitely thought you were working illegally. Probably safer to say learning to cook or Muay Thai.
It seems they don't like it that you spent time in Thailand previously and applied from a neighbouring country. They think some people have been working illegally in Thailand.