According to the USGS, the earthquake was caused by a sudden thrust, or release of built-up stress, along the major fault line where the Indian Plate, carrying India, is slowly diving underneath the Eurasian Plate, carrying much of Europe and Asia [REF].
The risk of a large earthquake was well known beforehand.