Players get retired from test cricket earlier even though it is the most honourable among all the formats. However, it helps them to lengthen their career which is most important to any professional cricketer.
Now every player want to gain more money and less work and we have too many 20/twenty leagues which are giving them good amount in very less time so they want to cash this with retiring from test cricket no one can do any thing because 5 days for one match is now very hard work so this is not going to stop in near future.
It is not about less work. Even for a T20 match that lasts 3 hours, the players need to train very hard. And the mental pressure can be much more than the case with test matches, which are played in a comparatively relaxed atmosphere. The most important fact is that T20 is the future of cricket. Test cricket will never get popular outside countries such as England and Australia, where people go and watch test matches on weekends to relax with their family and kids. Even in countries such as India, T20 has outstripped test matches in popularity.
The second factor is money. T20 leagues make a lot of money and the player salaries have increased manifold ever since the franchise leagues came in to existence. They will never get these sort of salaries from the ODI/Test matches. There are players out there who play in 4-5 different T20 leagues every year. I am not even talking about cricket heavyweights such as Chris Gayle or David Warner. I am talking about the less popular players such as Sandeep Lamichhane, Rashid Khan and Ryan ten Doeschate. Without the T20 leagues, these players will never get the exposure and financials that they deserve.
There is a third factor, which everyone tend to ignore. Test players are more prone to injuries. Bowlers need to put down 20 or 30 overs a day, which makes them vulnerable to exhaustion and injury. The same goes for batsmen as well, as in cases they need to bat for as much as 90 overs in a single day.