They could, sure. But they would have to waive somebody at that time, and it makes little sense to do that when there are no strings attached. Let's walk through this. In your scenario, there are two ways for the Cardinals to clear a spot on the 40-man roster:
1) Not protect a prospect for the Rule 5 draft.
2) Waive a player.
The Cardinals opted in this case to use the rules of the Rule 5 draft to their benefit. The differences are pretty startk
1) A player taken in the Rule 5 draft must remain on the active roster all season or offered back to the original team, who can then place him on the 40-man roster, when there is a 60-day IL to use.
2) A player taken on waivers only has to be added to the 40-man roster.
They're playing the odds and signing Wainwright when they did only made them commit to the prospect when they did, not gain any edge at all when it came to protecting their assets. If anything, losing a player in the Rule 5 draft is far, far, far, far better a risk than just losing a player to waivers, ala Mayers.