They're in the Rockets position with Fred....it's not really dumb for them. When you're trying to salvage an entire tank generation that you have a few seasons before you have to pay, may as well spend the money on an actual need.
Fred is overpayed, but Houston isn't mad at all. Fred has been the 20th best player in the league according to EPM (30th according to BPM), and has been a huge part of Sengun breakout and unlikely chase for a playoff spot. They paid 40 million for a team dad and they're happy with the deal at the moment.
Detroit would do the same with OG...OG/Ausar perimeter defence should be put on a terrorist watch list if it becomes a thing.