Just getting the X-Men to save the world was never enough for the makers of the franchise - there were always plans to deviate a bit from the action and to delve deep into the minds of the leaders of the two opposing mutant camps, Professor Xavier and Magneto. What began as an introduction to the two of them as young men, in X-Men: First Class, was the beginning of a trilogy.
This is not common knowledge, and maybe it was a last minute decision once the producers and writers gauged the reaction to the movie mentioned above. Good for us, though, because we are once again willing....