SpringHeeledJack - as some teachers have already said here, it may well be that 3.30 is the end of teaching time, and the teachers are getting the children ready for departure once the teaching time is over.
The alternative is cutting 10 minutes teaching time off the end of every day - which adds up to a lot of time lost.
I do think it would be reasonable of the OP to expect that, if this is the case, the school could have made this clear to the parents when their children entered the school, which would have enabled her to decide whether she could get her children to gym club after school.
However, she should be aware that this problem may well get worse not better as her children go up through the school. Once mine were in the Juniors, they were dismissed from their classrooms by the teachers and made their own way out of the building - and this could take my boys ages - partly due to the sheer number of children trying to get out of a small number of doors, and partly because they dawdled, even when they knew we had something to go to after school.
And whilst the OP may not have been unreasonable to want her children out of school at 3.30, she was both rude and very unreasonable to burst into the classroom and disrupt the end of the lesson in order to get her children out.
I am sure she would be the first to complain if her children's education was disrupted by other parents doing the same thing.