Is it supposed to be attacking a random square instead of the one you're actually facing or is that a bug
No not random! Attacks hit diagonally forward based on the character’s current forward/view angle