This latest earthquake is actually considered to be an aftershock from the September 3, 2010 magnitude 7.1 earthquake which struck near Darfield, NZ (35 km west of Christchurch). Since this main quake, there have been a half-dozen earthquakes greater than magnitude 5 in the Christchurch region.
Why does New Zealand have large earthquakes? Simple answer is that it lies on a tectonic plate boundary.
See New Zealand - east of Australia right on the boundary between the Pacific and Australian plates? Here's a plot showing 10 years of shallow (depth < 40 km) earthquakes in New Zealand:
They're not uncommon! The Pacific Plate is constantly pushing into and sliding under the Australian Plate deforming the island nation. It's a fact of life that they're periodically get hit with big ones. I could write more about convergent plate boundaries and such but it's late and I've been working since 8:00 am so I'll save it for another time. I will leave with a neat image from Christchurch showing the power of earthquakes - a rail line deformed by the quake. Steel tracks bent like taffy.