I think most folks are speaking with the benefit of hindsight. At the time the contract was given, there were some eyebrows raised, but Rojo had a decent number of apps for us.
2016/17: 21 PL Games (ACL towards the end of the season ~Apr '17)
2017/18: 9 PL games. (Recovered ~Nov 17 but struggled to get back into the team)
March '18 was when the contract was given. He
was a bit injury prone even then and did his ACL before the contract was given, so maybe that suggests that we shouldn't have given one out
https://www.transfermarkt.us/marcos-rojo/verletzungen/spieler/93176
Use that data as you may, but giving out a contract in hope that such a player doesn't leave on a free is pretty reasonable in my view.
A good thought exercise is to imagine a 27yo player was playing for us now and started ~20 games last season but had a major injury layoff this season. Would you give out a new contract and hope he puts his injuries behind him? Or will you let him leave on a free at 28?