According to the answer most fans repeat, Sonic received the shoes as a gift when he was just a baby hog. He put them on and simply never took them off again.