Found this, think it's a good explaination.
"HP Printers internally keep track of your cartidges by a serial number embedded into the cartridge. When it's low, the printer remembers. This is entirely done within the printer itself, and not the printer software. However, most HP printers will only keep 2 cartridges in memory, so if you have 2 extra cartridges, (even empty ones) you could cycle them through to reset the printers memory, and reset the ink level to full. Basically, even though you've refilled your cartridge, the printer has the cartidge's serial number stored in memory. This will reset it."
Hope this helps