With most HP ink cartridges the print head is built into the cartridge. So they will always be more expensive than Canon & Epson compatible cartridges, which are just an ink tank. It is also why the majority of HP compatible cartridges are refilled HP originals, rather than newly manufactured…
But it largely eliminates the problem of blocked nozzles. Canon & Epson printers waste a lot of ink flushing the system to avoid blockages. One study some years ago found that Epson printers were wasting up to 50% of the ink, if you print irregularly (although the testing methodology was not ideal). The HP printers were >90% efficient.
Also, printers with a permanent print head cannot risk allowing the ink cartridge to empty completely. And if air does enter the system a lot more ink has to be wasted flushing it out. If the print head is going to be replaced with every new cartridge, there is no risk in allowing the ink to run out completely.
In 2006(?) HP introduced a couple of printers which used a new system with permanent print heads that recycled the flushed ink back into the cartridges, making them nearly 100% efficient. But I don’t know if it is still used on any current printers.