Why did Lakshmana cut off Shurpanakha's nose?

Shurpanakha was Ravana's sister, a widow wandering the Dandaka forest.
She saw Rama and asked him to marry her. He said he was already married, and jokingly sent her to Lakshmana. Lakshmana sent her back.
Mocked by both, she rushed at Sita in a rage. Lakshmana stopped her, and on Rama's word, cut off her nose and ears.
She carried her fury to Ravana. And that is how the great war began.
Source: Valmiki Ramayana. Episodes found only in later retellings are marked as such.