I didn't knew middle names where given to the child so that they had also a christian name. Maybe thats more the case in more religious countries? Like I think my spanish teacher told me once, that during Franco every girl had to get Maria as middle name.
As far as I know, middle names are a protection against magic. You know how a name has power? When someone knows your real name, they can cast a spell on you. It's also a common trope in tv/movies.
Before the middle ages, people didn't have the problem of needing to tell people their complete name (not sure if they just didn't have family names or if they just didn't have to tell random people). So when they needed to give out both their given and family name, they where vulnerable to spells from random people. That's why they invented secret middle names.
I'm not sure about other countries, but in germany you generally don't have to give out your middle name when you sign up for stuff, not even for university/school. The only institutions I know where you absolutly have to give out your middle name is the state and the bank (which makes sense, because they probably have the most power over you, as they could completly ruin your life. The banks could delete all your savings from your account and leave you completely broke and the state could revoke your citizinship and birthrecord, basically delete your existance)