Only the owner of the ship is allowed to harm it and the owner would like the cargo to remain undamaged. I suppose the many other entities which would like to use the canal could pay the owner enough to make damaging the ship and cargo economical?
Egypt might be able to unilaterally decide to destroy the ship but I don't know how much benefit Egypt gets from keeping the canal open, they might not have a strong incentive either way.
I agree with you that collectively we should be able to say the safety of the ship is unimportant compared to all the other cargo which needs to get through that canal. However, 2020 should have made it clear that we're not good at solving that kind of coordination problem.
However, blowing up the ship is likely to create a even bigger mess, so that is the biggest reason that it is still there.
However, the ship is more important then the cargo according to maritime law. The commander have the right to let go of the cargo if there is a need.