My middle name is Louise and although I didn't like it much growing up (everyone at my school was either something-Louise or something-Jane, or just Louise or Jane) but I do like it now, I think it's quite a grown-up, formal sounding name,
I did look up middle names on the internet and this was one explanation:
It prevents your child from receiving the middle name Nmi. This doesn't happen as much anymore, but about 20 years ago, many computer programs were coded to recognize three names and only three names. If a middle name wasn't indicated, the program would insert NMI, which is military shorthand for no middle initial. While most folks do know what this acronym means, there are still some who don't, and if it shows up on a list of any sort, they think it's some exotic middle name. This may seem too silly to be true, but I've seen it and I've heard it more than once.
There was also a suggestion that it originated with Royalty giving their children more than one name to form bonds with others in the same way they married to form bonds with other countries and have allies in battles and wars.
Also naming a child after two or three wealthy relatives was a good way to assure that child would be remembered in the wills.
And of course, as has been said here, to give the child other options as an adult if for some reason they don't want to be known by their first name.
I know someone who has a family tradition to name all first-born boys Graeme but then to give them a unique (to them) middle name that they are actually known by. My friend is called Paul, his dad is Stephen and his son is David but they are all Graeme as a first name.
I also worked with a man named James who prefered to go by his middle name, Trevor but on business cards and things he was J Trevor Surname.