How to keep musicians in a rock band?

Many leaders of rock bands cannot understand why the musicians in their team linger for a while. It would seem that here is the person with whom you will work all your life. But time passes, and your guitarist or vocalist leaves the band. Someone explains their care by lack of time or children. And someone explains nothing at all and simply stops attending rehearsals.