While the princesses of Equestria do a very good job keeping their land a peaceful and bright place, this does not mean that darker and more insidious forces do not exist.
In order to combat these powers, one must understand them, and Celestia has ensured that there is always at least one living pony in Canterlot who does. For the past several years that pony has been Pale Bones, aided by his assistant Scarlet Shade. They spend most of their time in a hidden archive beneath Canterlot's library, researching the dark underbelly of Equestria and the dangerous abilities its denizens wield.