I wasn't aware Shawshank Redemption failed at the box office - it didn't fail, strictly speaking.
It didn't make a financial loss.
It just didn't pull in a lot of money, considering it's an excellent film.
Shawshank Redemption budget: $25 million.
Shawshank Redemption box office: $50 million.
^^^ Modest profit, really ...
Shawshank Redemption was a great film and it was entertaining yet only $16 million at the Box office after its initial theatrical run. For Hollywood standard, that is pretty bad. It did make more later.
Those in show business know that a box office flop can kill their career and that is why they make re-runs or whatever woke/traditional film will make them money. Entertaining you is just a consequence of the business.
If you take a look at the highest grossing films list, there is a pattern that works and Hollywood knows that.