I had this same problem. I opened a ticket with Player Support and found out that's a visual bug in the client UI :/
I accidentally put in something that sounds like a total auto-generated name... and it took the name without asking me for a confirmation screen.
So I got some Riot Points and bought a new name... because everyone thought I was a bot AND I wanted a name that said was available.
For the record: I put my current name "Ardelean" in the Client when I created my account and it said the name was available, but I got the same screen you did with that error at the bottom: "An unexpected error occurred. Please try again."
BTW, when I bought the new name through the website, that seemed to work.