The Cardinals were not going to give Cody Bellinger $17.5 million AND give Willson Contreras all of that money on his long-term deal. Like it or not, that's not where their 2023 budget was headed. They were going to spend big money one thing, then look to the trade route as needed. Had the team traded for the modestly-paid Sean Murphy to catch, there would have been money to spend elsewhere.
Also, as noted earlier, this team has a big outfield pile that does include Walker.
Johan Oviedo has ability, but at some point a pitcher ages out due to the 40-man roster limitations and the number of available minor league options left. The Cardinals could have kept Oviedo around for another year as a depth starter, but at some point he was going to get passed by other prospects. So trading him for significant short-term help made sense.
Alex Reyes presented the same dilemma. At point, after years of trying, it's time to turn the page.