Costa scored 58 goals in 120 appearances for Chelsea following his arrival from Atletico in the summer of 2014, helping the Blues win two Premier League titles and a League Cup. However, in June this year he was told by Antonio Conte via a text message that he was no longer part of his plans for the 2017-2018 season.
Thus the Blues signed Morata from Real Madrid in the summer to fill that gap, while last month Costa completed a return to Atletico in a deal said to be worth in excess of £50m ($66m).
"It was bad news because besides being a great footballer he was a very good friend," Alonso said to Cadena Ser when asked what he thought about the departure of Costa.
"The truth is that it was a shame. But he is very happy to have returned to Atletico. He loves Madrid and he was happy to return after he did really well there previously. But for us it's a shame because he was a great player and also very important in the dressing room.
Alonso, nevertheless, believes Chelsea could not have found a better replacement for Costa than Morata, with the former Real Madrid striker scoring seven goals in his first 10 appearances for the Blues.
"[Morata has been a good replacement] both as a friend and as a footballer. He has arrived and from the very first day he is contributing to the team with many goals and assists. I am very happy to have him here with us."
Alonso has also impressed at Chelsea since joining from Fiorentina in the summer of 2016.
However, he still surprisingly yet to be handed a chance with the Spanish national team as Julen Lopetegui has both Barcelona's Jordi Alba and Arsenal's Nacho Monreal ahead of him in the pecking order at left-back.
The former Real Madrid academy standout has not given up on playing in the World Cup, but admits that his only focus in is doing his best when Chelsea face Crystal Palace on Saturday (14 October).
"I'm just focusing on giving my best on the pitch. That's a question for the national team boss. They will have their reasons. I haven't spoken to [Lopetegui] but I believe he is monitoring me because what he has said in some press conferences. I am just focusing on given the best and the rest [a call-up] will come or maybe not," Alonso added.
"Yes, of course. It would be a dream come true to play for Spain and help them do well at the World Cup next year. I've been doing the right things for some time and the news from Chelsea eventually gets there [to Spain]. Spain have great players and I hope great things happen in Russia in the summer."
Some in Spain suggested that Alonso would have more chances to make the national team if he were playing in La Liga.
Alonso's father played at Atletico Madrid and Barcelona, while his grandfather featured for Real Madrid.
The current Chelsea wing-back also grew at Los Blancos academy before moving to England to play for Bolton in the summer of 2010.
Asked whether he would like to emulate his father or his grandfather and play one day in Spain, Alonso added: "It's not something that I think much about. Obviously, before I retire I would like to play in La Liga because I have not played much there. But I'm very happy at Chelsea and in London."
"I do not think much in that but I would like to play in Spain one day. Especially when a couple of weeks ago we went to play against Atletico, you see the good weather, good friends... you become more eager to do it but I'm happy in London and all I think about Saturday's game against Crystal Palace. I really like the Premier League and have the opportunity to play for Chelsea and win titles. This is what every player want."
Alonso, nevertheless, won the Premier League in his first year at the club after playing a crucial role, scoring six goals in 31 games.
The former Real Madrid academy product concedes that it won't be easy to replicate that success this season, but backs Chelsea to fight for the crown until the very end.
"There are many teams that can fight for the title. We saw it two years ago that even a team like Leicester fought and won the league. The Manchester clubs have strengthened their sides very well, Tottenham have a solid group that has worked together for some time, Liverpool have a strong side too," Alonso said. "It's not going to be easy to win the Premier League again but we will fight in each game to be in the battle until the end."