This is done to relieve pain in badly decayed tooth.