If you go to Baseball Reference and sort team DH performance by OPS, you'll see one team on the list that is an outlier in the worst way: the Seattle Mariners.
To this point in the season, the Mariners have a .325 OPS from their DHs, 191 points below the 29th-ranked Chicago Cubs. This is beyond awful production from their DH spot, and with some other holes in their lineup existing as well, there aren't clear internal answers to fill in at that spot.
Yepez would be a massive upgrade over Cooper Hummel and the other DH options Seattle has used to this point.
The Mariners have multiple MLB-ready arms who could feature in a deal in Bryce Miller, Emerson Hancock, or Taylor Dollard. They could also part with some of their current Major League arms, like Chris Flexen or Marco Gonzalez, to improve the Cardinals' pitching a bit.
Honestly, if the Cardinals are not packaging Yepez for an elite arm, it probably makes more sense to get back prospects than another back-of-the-rotation starter.