Has anyone used Dingtian 8ch Ethernet Relay?

The yaml is just a very high level description of what the board will do, but it’s not a real programming language. In the custom component there is the logic that allows the hardware components of this specific device to work. In esphome there are a lot of “hidden” components, which are built-in, they can be simply declared in the yaml, and they are used “under the hood” by the esphome compiler. For example, simply typing web_server creates the web server with all the ui. you can imagine that a lot more is needed in order to create a webserver. That code is simply put by the compiler without you even knowing. There is no built-in component for the hardware that’s included in this board and the logic that is required to drive it, so an external one is needed.

No it’s not. I can use all the 16 the inputs and the 16 outputs of my board.

I recently got the board DT-R008 V3.6.13, which is v2 series. It has slightly different wiring that allows using the spi offload.
My changes can be found in GitHub - prudy/dtr0xx_io at dtr008v2io