I think you meant "marginal cost", and in software it mostly comes from the cost of engineers and infrastructure that maintain, create, and deliver the software. Nowadays that includes bandwidth, storage, and compute for any cloud component. Software is only zero marginal cost if you create it, release it, and never touch it again.