Mathematically; KVA = KW at unity p.f
While
Device that supply power are rated in VA or KVA such as transformer because we don't know the power factor of the load it will supply power to.
Mathematically; KVA. = KW/p.f
The load for the transformer is unknown as it could be capacitive , resistive and inductive where the power factor is variable , so we use the apparent power ( S ) while the motor has inductive resistive load with fixed Power factor, so the power is known ( P= S x PF ) where the PF ( power factor = cos G ), G is the angle in degrees.
Finally, Which electrical machine is produce the power there we used KVA unit.
Which electrical machine is observed the power there we used KW unit. KW / KVAR = KVA