Same argument as with Nvidia for example. Why won't Nvidia just take part or all GPU and mine some tokens on them? Technically they can, but if they will do it, they are forfeiting every single tech innovation they have made over last decades in the area of graphics, drivers, interoperability, all the software they have created and so on. By doing that they will immediately stop getting revenue from that efforts and start losing non-crypto customers.
Same with Hetzner. They aren't just renting a box to people. They rent a box and SLAs, basically promises that that box performs as advertised. And to achieve that they have invested a lot, which will be pointless if they'll start mining themselves.
Because Hetzner is a hosting company, not a cryptocurrency operation. Both of them are obviously two different things and just because you're good at one of them doesn't mean you're good at the other. Or maybe they simply prefer to offer hosting to people rather than a financial network, what do I know?