Pique retired before Christmas, while Alba will leave this summer.
Xavi said: "When you have to make decisions contrary to what the player would like, it starts to be difficult. I had to tell Piqué to step aside, that he would play less. It was even hard for me to sleep, because we had enjoyed a lot together.
"With Jordi Alba you have the feeling that you are failing as a friend, but you have to prioritise the team.
"It happened to me with Luis Enrique, you don't understand it, you have the feeling that you have to play after so many years as a starter. Jordi got angry, you have to understand it. But later there was a group chat and he told us that he was one hundred percent committed. And that's how it was, like Piqué. They knew how to leave at the right time."