This isn't difficult. Employees get paid for their time. Brick-layers and programmers alike. The brick layer doesn't fix the wall for free. The bulider pays the brick layer by the hour to fix the wall. The owner doesn't pay the builder because the builder is contracted by the owner whereas the brick-layer is employed by the builder.
And this all makes sense. Since the choice of brick quality is made by the builder, the builder is accountable for fixing it.
Same goes for the software programmer, whose employer chose the platforms and the deployment schedule. The programmer gets paid to work. The quality of the work doesn't affect the pay at all -- just the odds of future employment.
For the record, I own and operate a web development company, for 21 years now. Bug fixing is always free to the client for the life of the project. I hate it when dumb employees make stupid mistakes. But I don't get to withhold their payment. I do get to fire them though. And I do get to engineer a platform that requires fewer employees. And I do get to choose clients and projects that don't require me to have employees do anything at all.
So, to answer your questions directly, there is no difference between software bugs and wall bricks. The only question is whether or not you contracted the programmer or hired the brick-layer.