Goes back to the days of Rama V after his visit to Great Britain, where it was usual for the National Anthem to be played at the end of a movie.
So impressed, he took this tradition back to Thailand, although they had to change it to before the movie started, as no one paid any attention.