Let's say you are praying, and someone stands right behind you praying 180 degrees away from the direction your praying in. Wouldn't it be the exact same thing considering the fact that the earth is round and you both are praying in the same direction?
So from wherever you go out [for prayer] turn your face toward al- Masjid al-Haram, and indeed, it is the truth from your Lord. And Allah is not unaware of what you do. Quran 2:149
So if you are standing near masjid al haram if you turn 180 degree opposite, you will not be facing your "face" towards masjid al haram. So I assume we have to stand in the shortest direction towards masjid al haram. Technically standing 180 degree will be ok in place where mecca is same distance both ways but still for maintaining uniformity one direction need to be decided by Muslims there.
But if you have real difficulty in facing the right direction or is unable to find the right direction, it is not haraam (forbidden) to pray in different direction.
If done unintentionally, then it is absolutely ok because wherever you face, everything belongs to and glorifies Allaah SWT.
If you are talking about intentionally praying towards the opposite side then it is totally wrong and Your faith might be jeopardised for doing this so never take such a risk EVER!.