It's more about coverage for every generation of Pokemon. Every generation has a life cycle of about 2-3 years and in order to make sure that people keep playing the games until the next generation comes out, there has to be enough unused content that can be distributed over the years of the respective life cycle. Another part, which basically comes in tandem with that is promotion.
If a life cycle goes on about three years and you have three unreleased legendaries and three movies that yet have to be aired, then it would be a waste to just make them public and be done with it. Instead they keep those Pokemon a secret and whenever a new move is anounced (well, to be exact, it doesn't neccessarily need to be a movie, it can also be some other random event), they can just go like "hey, there's this cool new Pokemon you never knew about. When watching the movie, you also get the chance to get it into your game".
After those three years passed, all Pokemon became official and the new generation is already on the horizon featuring new unreleased event Pokemon.