James ended his time with Madrid on Tuesday, moving to Bundesliga champions Bayern Munich on a two-year loan deal with the option of a permanent transfer.
The 25-year-old fell down the pecking order at the Santiago Bernabeu following Zinedine Zidane's arrival in January 2016 – starting just 13 La Liga matches as Madrid dethroned Barcelona last season.
James will now reunite with former boss Carlo Ancelotti but Sanchez – who won five La Liga titles during his time in the Spanish capital – questioned the Colombia international.
"James needed to prove to Zidane that he can trust him in every game, not just the once but also the next one," Sanchez told Radio MARCA.
"One's character has to harden and that's what James was missing.
"To play for Real Madrid, you have to put a little more in."
Sanchez is also hopeful Madrid can keep hold of Spanish forward Alvaro Morata amid growing speculation of an off-season departure.
Morata was tipped to join Manchester United before they signed Romelu Lukaku, while Premier League champions Chelsea have emerged as a possible destination as the former Juventus star searches for more game time.
Despite the uncertainty, Morata was included in Madrid's 26-man squad for the International Champions Cup in the United States.
"To sell Morata is a luxury that I hope is not necessary," Sanchez added.
"It is clear that he prefers to be playing than warming the bench, and especially given that next year there is a World Cup, where he wants to start for the Spanish national side."