How does this DC Electric Motor Control Circuit Works
What you call the feedback loop is nothing more than op-amp measuring motor current over the shunt resistor and amplifying the measured voltage to a suitable level so that the MCU can read it with ADC input. Most likely a safety feature to cut power to the motor if hits the end of the movement or there is a human body part blocking the movement.

The PWM output from the MCU is a 3.3V signal, and has current drive ability in the order of 10-20 mA. That is not enough voltage to turn the FET fully on, and the FET gate needs to be driven with higher current to turn it on and off faster. Therefore the PWM signal is amplified to 12V level and buffered with a push-pull stage so that the FET gate is driven with 12V signal that has fast edges.