Why was the boy who cried wolf written?

It was written to teach kids that lying can have negative consequences.