There is a slight difference, but it's not to do with formality! The difference is that magnitude is usually about the size, importance, and impact of something, and extent is usually about range. Here, for instance, magnitude means size or range as well as importance. So using only extent would be limited in meaning.
Ex: The extent of our influence only reaches a certain point.
Ex: The magnitude of the policy change is huge.