Marginal cost of a small microprocessor in an ASIC is nothing.
The RAM costs a little bit, but if you want to firmware update in a friendly way, etc, you need some RAM to stage the updates.