Why are core losses mechanical and not electrical in an AC power flow diagram?
The synchronous motor/generator has two power ports, a mechanical power port at the shaft and electrical power port at the motor/generator terminals.

Because mechanical losses and magnetic losses (core and stray losses) are (approximately) proportional to the motor’s rotational speed, they are often taken together and referred to as rotational losses. 
Rotational losses are mechanical in nature and are thus subtracted from the mechanical power.
That's why the core and stray losses are shown before the conversion from the mechanical domain to the electrical domain.

So, stray losses and core losses are not mechanical power losses, but they are subtracted from the mechanical input power (port). The mechanical power losses themselves are subtracted as well. This subtraction is shown by the down pointing wide arrows.

Literature:  


http://electricalacademia.com/synchronous-machines/synchronous-motor-generator-efficiency-losses/
https://www.motioncontroltips.com/faq-what-are-rotational-losses-in-dc-motors/