Speaking for myself, it was partially due to uninspired leadership and partly just getting bored with the work after many years. It’s not the boss’s fault and it’s not the employees fault exclusively. However, if the employee is asking for opportunities to try new things or different challenges and is being told NO, then disconnecting is going to happen. Part of a strong leader’s job is to find out what motivates their people (what they are passionate about), put them in a position to use those gifts within the company, and then get out of the way, encourage their successes and guide them through failures.
The good news here is that you have an opportunity. You see the problem right in front of you. Go talk to the person and ask them what would excite them again. Ask them what they feel is missing. And most importantly, seek to listen and understand first. Dont jump in and tell them why none of it will happen. Be open minded and you will be amazed at what they tell you IF they feel like they can trust you with the feedback.
Finally, ask them what you can do to help make their requests a reality.