Question: When the evil Count Olaf disguises himself at Captain Sham, how did he end up with the peg leg? To get the children's money, did he literally cut off his own leg to be rid of the identifying tattoo on his ankle and also create a more effective disguise?
Answer: Of course not. It's common practice in theater (and movies) to simply tie the lower leg to the thigh and attach a peg at the knee.
Xofer