Toenail randomly lifted off. Anyone else? Any explanations?

A couple of months ago, I took off my toenail polish. And noticed that my big-toe toenail was randomly just lifting away from my toe. It was lifting from the base all the way along the length of the nail, it wasn't splitting from the top down.

There was no discolouration of the nail or the toe, no pain. My doctors said it wasnt a fungus. I hasn't banged it or damaged it in any way.

It's growing back, and I now have half a toenail.

Anyone else randomly lose a nail like this? Or can anyone suggest why this might have happened?