What does _SFR_IO8(0x04) do? AVR
It is a macro to access AVR IO address space registers, and in that address space, register 4 seems to be DDRB. You might want to actually use the datasheet as the register reference, instead of digging the info from avr-libc headers.

The macro _SFR_IO8() is actually a macro to call _MMIO_BYTE((io_addr) + __SFR_OFFSET), which in turn is a macro to just access the byte of memory pointed by the address like this: (*(volatile uint8_t *)(mem_addr))