Hardhat is a backbone of modern smart contract development. It makes not only writing smart contract easy, it also helps with things like debugging and integrating with 3rd party tools via plugins. Optimism is just one of many projects that used it to build their system.