I am not sure if the sign in the toilet said that we shouldn't use it if the train was not moving or that we shouldn't do so if the train was at the station.
I don't know specifically for the country you are in, but in many countries, this is because the toilet empties directly onto the tracks, even in countries with relatively modern trains. Even in the UK, some trains still do this (I found out when searching the Railway UK forums)
Another reason is because toilets on trains require pumps, and in the station there may not be sufficient spare power to allow the toilet to flush correctly. This may be vacuum pressure or electric pump, depending on the type of train and toilet.