How can I use esptool to flash like web.esphome.io?

I want to flash ESPHome device locally for some reason. I can flash firmware.bin by utilizing web.esphome.io. But when I tried to flash the same firmware through esptool by running the following commands, it won’t work:

set /p "port=port(COMx): "

esptool --chip esp32 --port %port% erase_flash
esptool --chip esp32 --port %port% write_flash -z 0x1000 firmware.bin

Oh god! I successfully flashed it by changing the flash address from 0x1000 to 0x0. But why? When I flash micropython I use 0x1000. Any difference between these two firmwares?