The answer: Because of a harmless-to-humans viral infection.
The bluish egg above was laid by an araucana, a breed of chicken native to Chile and one of two breeds well known for occasionally popping out a blue egg. Turns out, it's the result of the chicken being infected with a retrovirus — a virus that can insert its own genetic information into the host's DNA. In this case, the virus just happens to turn eggs blue.
Maggie Koerth-Baker is the science editor at BoingBoing.net. She writes a monthly column for The New York Times Magazine and is the author of Before the Lights Go Out, a book about electricity, infrastructure, and the future of energy. You can find Maggie on Twitter and Facebook.