Since the core and spindle is the inner part of a hub motor, it will try to spin when the motor starts if that's easier than turning the wheel to drive along the road. To stop that from happening and twisting off the cable connection, an arm having two flats in it's hole to match the spindle size and flats is fitted onto the spindle, the other end of the arm locked to the fork or frame so that no spindle rotation is possible.
A torque arm is always desirable and safer, though the less powerful motors can be restrained just with serrated washers and very tight wheel nuts. However, that depends on whether the fork end opening is strong enough. Some alloy fork ends are soft enough for a motor's powerful torque to twist apart the fork end opening and let the spindle escape by twisting it's way out.
In the photo example below someone has used a spanner onto the spindle flats and tightened the wheel nut against it, with the other end of the spanner jubilee clipped to the fork. Although a bodge, it well illustrates the principle of a torque arm:
This second link is to a proper torque arm:
E-bike torque arm kit
.