Giving a lock of hair means that you're forming a special bond with that person.
It's been quite common in Western culture up until about 50 years go. Historically it was incredibly common.
One authoress (I can't remember her name) received so many letters asking for a lock of hair from her fans that she went bald cutting it all off
My parents still have my baby hair so it's not that odd, although they could have packaged it better!!