All key storage software depends on some hardware to run, whether that be a phone, laptop, server, or hardware wallet. There are multiple places where malicious code or hardware can be inserted into the supply chain. Fake hardware wallets have been spotted in the wild. Earlier in the supply chain, malicious chips or even tainted firmware can be inserted by someone who has access. Keep in mind the attacker might not be the creator of the hardware wallet. The attacker could be a manufacturing partner or a single rogue employee.