Is it always necessary to prove the 'iff' in both directions? I have an exercise in my course, which asks to prove $A \cup B = B \iff A \subseteq B$.
My proof is: Let $A \nsubseteq B$, that is, $\exists a \in A : a \notin B$. Then from the definition follows $a \in A \cup B = B$, in contradiction to the initial assertion. $\square$ 
Usually I see that it's much more rigorous to prove $\implies$, then $\impliedby$, but I'm not sure, if that's only an option or a strict rule — and specifically if my proof does the job in both directions or there are some gaps that I don't recognize. My script suggests a really long 10+ lines proof using the 'both directions style', but I myself don't really see this necessity at least here.
This being said, is it always a must to prove the 'iff' in both directions?
 A: It appears that you're trying (without making it completely clear) to prove $A\cup B=B \Leftrightarrow A\subseteq B$ by showing that $A\cup B=B$ together with $A\not\subseteq B$ leads to a contradiction.
If you think that is a complete proof, how about this one, by the same principle:

Claim: For any integer $n>2$, $$ n\text{ is prime} \iff n\text{ is odd} $$
Proof: Assume that $n$ is prime and that $n$ is not odd. Then $n$ is even, so $n=2k$ for some $k$. But then $2$ divides $n$, which is a contradiction with $n$ being prime, since $n>2$. $\Box$

This seems to follow exactly the same logic as your proof -- namely, considering $P\Leftrightarrow Q$ to be proved because I have shown that $\neg Q$ and $P$ together lead to a contradiction.
But there are odd numbers that are not prime -- such as $9$ -- so the claim is not actually true.
A: "iff" means it is true both ways. If you only prove one way, you haven't shown "iff".

You are supposing the right hand side false, and show that if this is so the left-hand side must be false also, giving a contradiction. So if the left-hand side is true, the right-hand side can't be false, so must be true. You have shown the forward implication.
But now you have also to show the reverse implication. Note that with sets, to prove equality you also have to prove two things - so to show $A\cup B=B$ observe that if $a\in B$ then $a\in A\cup B$ by definition of union, whence $B\subseteq A\cup B$
Suppose $A\subseteq B$ and $a\in A$ then $a\in B$ by the definition of a subset. And if $a\in B$ then $a\in B$. Now if $a\in A\cup B$ then in either case $a\in A$ or $a\in B$ then $a\in B$. So $A\cup B\subseteq B$.
Since each side of the proposed equality is contained in the other, they are indeed equal.
I wrote this out in detail because of the hidden two-way implication concealed within $=$.
A: Left to right.  A $\subseteq$ A $\cup$ B = B.
Right to left.  A squeeze proof.
B $\subseteq$ A $\cup$ B $\subseteq$ B $\cup$ B = B.  
Yes, iff, if and only if, means prove both directions.
