I think you can observe the same phenomenon with anti (ἀντί), also in Greek which evolves from "in front" to "instead of" and eventually to "against" (more productive in modern languages than in classical Greek).
- As "in front" in toponymy: Ἀντίπολις => Antibes, Ἀντικύθηρα => Antikythera, etc..
- As "against": αντίδικος => opponent (same progression and etymology in Latin for opponent and for adversary).
From "in front" to "against", the semantic path is clear.
Similarly for παρά, we progress quite easily from "side by side" to "compared to" and in some cases from "compared to" to "contrary to".
When the object is literally on our side (as in we can lean on it, see s'appuyer, appoggiarsi) then we don’t have an acceptation of "unfavourable".
- Παρὰ θεοῖς καὶ παρ᾽ ἀνθρώποις => With Gods and men. Favourable.
If instead, the object is out of place (in this sense of παρά: not in its right place) then the idea is that of "different from". This is visible in English in such words as parascience, parapsychology, or even paralinguistics. In classical Greek we have for instance:
Παρά μοίραν => Contrary to fate, unfairly. We still have to count with the Moirai but this is probably not a favourable factor.
Παράδοξος => Out of (contrary to) δόξα expectation, opinion
English also uses beside to suggest this kind of opposition. Maybe after all this explanation is beside the point.
So in conclusion, the intended meaning is not as much 'against' (which would be κατά or ἀντί) as '[unexpectedly] different'.
The English word with followed a symmetrical/opposite evolution.
(A brief digression: Using "symmetrical" to mean "opposite" is also quite revealing.)
- In Old English wið meant "against" (it still does in withstand or withsay for instance). From Proto-Indo-European *wi ("separation").
- Now with means "alongside".
So this time the semantic shift seems to be "separate" => "face to face" => "alongside".
For instance if you pit two armies face to face they actually form parallel lines.