This year Porcello's xFIP places him 39th among starting pitchers. Not at all great so far, but the 39th-highest pitchers' annual salary this year is $11,500,000 -- marginally less than Porcello is making. He's doing just about what he's paid to do this year, even if he never gets any better.
By the time Porcello's contract is over, 50th-rank pitchers will be making over $15,000,000 per year, assuming present trends continue. Is Porcello going to be a significantly worse pitcher in every year going forward, than in his first dozen games here?
You can say you don't like the contract; that's fine. It may not be a great contract. But for it to be as disastrous as you seem to think, Porcello would have to be one of the worst pitchers in the league every year until 2019. If he's just average, that's OK, because in a few years his salary will be more or less an average salary. All he'll have to do to be worth his 21,000,000 is be a mediocre pitcher. Any more than that is gravy. If Porcello's arm doesn't fall off, then the contract will work out just fine.
That's why owners are signing players for long extensions now. Because baseball salaries are exploding so fast that a top-ten salary today will be a mid-level salary in a few years. Even if you're signing a player who is only a little better than average, you'll come out ahead at the end of the contract. In general, people who can afford to buy a baseball team understand trivial economics.