Why will the \$I_C\$ flow to the opposite direction for an ungrounded system
C is grounded. A and B are floating as represented by the caps. So A/B are biased at a higher or lower DC bias than C.

I feel there is more context to this diagram which you are not revealing. I do not think this diagram is supposed to be representing 3 phase AC currents flowing.