Loðbrókr (Hairy-breeches) wasn't Ragnar's surname, it was a byname, a nickname, if you will. It's why you see people with names like Auð djúpúðga (Aud the Deep-minded), Hrolfr ganga (Hrolf the Walker), Eiríkr blóðøx (Erik Blood-axe), Eiríkr rauði (Erik the Red), and Sveinn tjúguskegg (Sweyn Fork-beard) in sagas and histories; they're famous and have a distinguishing characteristic, so they get referred to by that. Laxdæla saga has an incident where a character, Án, gets a nickname (hrísmagr, or twig-belly) because of a dream he had, and is referred to by that throughout the rest of his appearances in the saga.
Put simply, Lothbrok was a nickname, meaning "Hairy breeches/breeks".