The reason is obvious: human activity.
These creatures literally spend all their lives, whether as beetles or as larvae in damp, warm forests and inside rotting wood or logs and when we remove forests and set fire to our fields, we destroy their habitats. Climate change is another big factor where excessive dry or wet weather can kill the larvae in the soil.
Many of the species are red listed all around the world and have gone extinct in many European countries. I have modified the life cycle drawing of the stag beetle and placed it below: