Just one example:
Computation runs inside database e.g. before page is rendered.
Dynamic action is triggered from browser when page is already rendered.
In this case it is more efficient and secure run computation.
Dynamic action is one extra call to database.
But yes, you can archive same result with both.