Remember, the deal is 97 million guaranteed and 12 million "tied to championships." So that's 24.25 million/year with the potential to be worth 27.25/year (the details of the bonus haven't been revealed so I'm just guessing based on an average). If they win a title, they'd gladly pay that. I'm just pointing this out because it seems like some people are thinking he's making the max or something.
I don't think that's a crazy amount because they're clearly going for it and two years of solid play would make the deal worth it. Also, they had to sign somebody before Simmons' contract extension kicks in and they're capped out. Were there better ways to spend that money? I can't really think of anyone else that would have gone there that is an impact guy, maybe Bojan Bogdanovic since they need shooting? Or, they could have tried to get Mirotic who went to Europe. Other than that, there aren't many other attractive names that aren't role players and whom fit their team.
There's also the added benefit of making the Celtics weaker in the short term. Horford was one of the few guys who could somewhat guard Embiid one-on-one, and he's also good (if you can say anybody is) at guarding Giannis.
Basically, it's the kind of deal that makes sense for a contending team but is too rich for a non-contender. That's why you could say both Philly and the Celtics made the right decision.