To me it's a shuffling of the deck chairs move. Matz projects worse than Yariel at this point so spending 7 million on a the hopes that he'd duplicate his 2021, which may only be a .5-1 win upgrade doesn't seem worth it.
Yariel projects at 1.6 next season, Matz career year was 2.7. Yeah it's only 6-7 million in your hypothetical but the payoff isn't worth it when you consider the liklihood of him actually returning to his career peak from 4 seasons ago.
It's more likely Yariel puts up 2fwar.
If the thinking is that Matz is insurance for one of Yariel or Francis (also 1.6fwar projection) stinking up the place...okay, but even then it's not a needle mover.
If the Jays want to add a depth arm, ot should be from the result of signing someone clearly better, pushing someone currently in the rotation out of it.
Bumping Yariel for Matz isn't that move.