Hi ! PC runs g-code sender - this programs monitors and established USB connection with microcontroller, and sends sends strings of g-code to it. It isnt computing g-code just sending. When microcontroller does it it will be easy to implement other input of g-code like USB stick or SD card. It sends data in no real time fashion.
Microcontroller will to this job in real time fashion, then it will send with only SPI commands (no step/dir) to motor controllers (in this case tmc5160). Standard in other solutions is to configure them by spi but then use step/dir to controll motors.