Hallo! Just a little English lesson that might help clear up the difference between the physicality and morality of being 'against' something.
Think of the sentences, "She is against the idea," "She runs against the wind," and "She leans against the door." There are prepositional phrases in these sentences. If a prepositional phrase can be removed from a sentence, the sentence should still be structurally sound. Like this;
She is (against the idea). She runs (against the wind). She leans (against the door). In each instance, 'she' is the subject, followed directly by a verb. The preposition following that verb is what we're looking at.
1) "She is." "Hun er." In Norwegian, 'be' is a very existential verb. You can 'be' happy, 'be' sad, 'be' there, 'be' anywhere, just like how English verbs have many different applications. Truly, the context is everything. Hun er mot ideen; she's against the idea. "Can't mot also mean towards?" Okay, think about this.
2) She runs. "Hun løper." If you want to know where, or how, or why she's running, you need to analyze the prepositional phrase, (against the wind); so, the wind is blowing towards her, and she is running towards it. Just as well, if you're swimming against a current, you're swimming into the current, while it is flowing into, against, toward you. If she is running into the wind, hun løper mot vinden.
3) She leans. "Hun lener." (Leans what? Herself; "Hun lener seg.") Again, think about the prepositional phrase, (against the door). Remember how every action has an equal and opposite reaction? If you push against a wall, the wall by law will push back in equal enough force to prevent itself from falling over. For this reason, leaning against a wall is much like swimming against the current; you're pushing towards, into it, and it is pushing back into you. You are pushing your weight against the wall. If she is leaning her body against a door, hun lener seg mot døren.
I hope the formatting isn't terrible for you to read, and I hope this may have helped anyone.
"She (subj) is (v)." Is what? "She is against (prep); pushing into; resisting." against what? "The (article adj.) idea (object of the preposition)."
"Hun er." Er hva? "Er mot." Mot hva? "Mot ideen."
"She (subj) runs (v)." Runs how, when, or where? "She runs into. (prep)." Into what? "Into the (aa) wind (obj. of the prep)."
"Hun løper." Loper hvordan, når, hvor? "Mot." Mot hva? "Mot venden."
"She (subj) leans (v)." (Leans what? herself; understood pronoun.) Leans herself how? "Against (prep)" Against what? "Against the door (obj. of the prep)."
"Hun lener." Lener hva? "Lener seg." Hvordan lener hun seg? "Lener mot." Mot hva? "Mot døren."
It would help if you were to say what languages you know already. Without that, explaining grammatical gender can be awkward.
Most European languages, English being a rare exception, put all nouns into a series of classes called "genders". For various reasons, theses happen to line up with the third person pronouns used to denote personal gender in humans, hence why you can have inanimate objects referred to as "masculine" and "feminine", but that's more a quirk of the way things lined up grammatically in the ancestor languages rather than some existential statement on the word.
The various parts of speech linked to a noun must "agree" with noun's gender. That is, if a noun is masculine, the masculine form of the definite and indefinite article must be used, the masculine form of the adjectives describing the noun must be used, and any pronouns used to refer to that noun must also be the masculine form.
As to why a language might do this, it's because it gives extra information that can help disambiguate sentences. If you know a noun's gender, when it gets referred to later by a pronoun, the pronoun used helps narrow down what is being referred to. Let's take a hypothetical example and say that "pen" is masculine, "table" and "pencil" are feminine, and "paper" is neuter. If we were talking about someone sitting down to write something, then saying "Paul sat down at her and wrote on it with him" would tell us that he's writing with a pen, not a pencil.
"En", "et", and "ei" are the masculine/common, neuter, and feminine articles in Norwegian. When it comes before the noun, it's the indefinite article (equivalent of "a/an") and affixed to the end of the noun, they act as the definite article ("the" in English). As it's less obvious in Germanic languages what the noun gender is (unlike, say, Romance languages, where is usually obvious), nouns are typically learned with an article to help with memorising the gender.