Why does the magpie cover its nest with thorns ?

Because its eggs may thus be protected from birds ; a danger which it seems to understand, by its feeding on the eggs of others.