The trade deadline is the best time of year to take certain flaws your roster may have and turn them into... pretty much anything else.
For the Phillies, they walked into the deadline needing depth. They needed to find some type of pitcher, some type of valuable bench piece, and a bat to help the lineup.
These aren’t flashy needs but they built the roster to avoid this situation, even when they lost Rhys Hoskins to injury, they still have star hitters.
A good comparison is what the Marlins did, who don’t have high-priced talent throughout the lineup.