Cup product motivation I have just begun reading through Section 3.2 of Hatcher's Algebraic Topology. While I reasonably understood the computations relating to the cup product, I was unsure of the purpose of the cup product. From what I knew, it does not help us to compute cohomology groups, given that we need the cohomology groups to compute the cup product. 
In a nutshell, why do we care about the cup product? 
 A: The cup product gives us another bit of structure.  If you look at how many abelian groups there are up to isomorphism of a given order, that gives you all the possible homology groups.  Once you add ring structure, you get way more isomorphism classes.  This makes cohomology a better invariant.
I should also add that the cup product structure can have geometric meaning.
A: *

*The cup product adds a lot of rigidity to maps on cohomology. For example, you can use it to show that the maps from $RP^m \to RP^n$, $n < m$, must be trivial on $Z_2$ cohomology (This is an exercise in chapter 3.2, and it leads to a proof of Borsak-Ulam). This is the kind of rigidity you see from torsion (only zero map from $Z/2Z$ to $Z$), but here you get it even between free modules, because there is torsion in the cup product.)

*Suppose you want to know how many charts (homeomorphic to $\mathbb{C}^n$) are needed to cover $CP^{n}$. You can use the cohomology ring structure and exercise 2 in chapter 3.2 to figure this out - if you could cover it with $n$ such patches, then all cup products of $n$ positive dimensional cohomology classes would be zero (this is exercise 2 in 3.2). However, we know that the generator $\alpha$ has $\alpha^n \not = 0$, since $H^*(CP^n) = Z[\alpha] / (\alpha^{n+1})$. Since there is a covering by $n + 1$ patches, we conclude that $n+1$ is the minimal number of open sets in a covering by spaces homeomorphic $\mathbb{C}^n$. (Similarly for $RP^n$. You replace patches by covering by contractible spaces.) (I don't think there is a proof of this that just uses the cohomology groups.) The notion that this uses is called cup length.

*In fact the cup product can help you to compute cohomology groups. This example, called Leibnitz rule propegation, uses spectral sequences. If you aren't familiar with them, what you can get out of this is that the product rule for differentiating a cup product (in an appropriate sense), let's you do computations that would be difficult otherwise.


Suppose that you want to compute the cohomology of infinite dimensional lens space $L_m$. Since $L_m = S^{\infty} / Z_m$, with $Z_m \subset S^1 \subset C^*$,by modding out by the full group $S^1$ we get a fibration $S^1 \to L_m \to CP^{\infty}$. (Here my $S^{\infty}$ is built from a union of odd dimensional spheres in $C^n$, so has an $S^1$ action.) Since the base is simply connected, the $E_2$ page of the serre spectral sequence is $H^p(\mathbb{CP}^{\infty}, H^q(S^1))$. If we take for granted we know the cohomology of infinite projective space, we see that the spectral sequence degenreates after the second page, just by looking at where the differnetials must go. Moreover, all of the nonzero groups in the $E_2$ page are infinite cyclic. 
To compute the differential on the second page, it turns out that all we have to compute is the differential from $H^0(CP^{\infty}, H^1(S^1))$ to $H^2(CP^{\infty}, H^0(S^1))$ - this can be seen to send a generator to $m$ times a generator if we know $H^2(L_m) = Z / mZ$, which we can obtain from an easier computation (By covering spaces, $\pi_1(L_m) = Z/mZ$, so $H_1(Z/mZ)$, and if we study $S^3/ Z_m$, then poincare duality implies $H^2(S^3 / Z_m) = Z/mZ$, and then because of the cell structure stuff, $H^2(L_m) = Z /mZ$). 
I will call $\alpha$ a generator of $H^1(CP^{\infty})$, and $\beta$ the generator of $H^1(S^1)$, and let $1$ be the generator of $H^0(CP^{\infty})$,, so that elements in the groups in the $E_2$ are of the form $\beta^m \alpha^n$, $m \in \{0,1\}$, $n \in \mathbb{N}_{\geq 0}$. Then we know:
1) $d(\alpha) = 0$ (from the location of zeros and direction of differentials in the $E_2$ page). 
2) $d(\beta) = m \alpha$ (previous paragraph)
3) Hence, $d(\alpha^n \cup \beta) = d(\alpha^n) \cup \beta + \alpha^n \cup (\beta)) = m \alpha^{n+1}$. (Here we use the Leibnitz rule relating differentials in the Leray spectral sequence to the cup product, $(a \cup b) = da \cup b + (-1)^{deg a} a \cup b$. Also, $ (\alpha^n) = 0$ follows from the Leibnitz rule.)
So, we get that all of the $H^{2k}(L_m)$, $k > 0$,  are $Z/mZ$, and that all the odd dimensional cohomology groups are trivial.
Here is a reference for the above computation (which is morally the same idea, has fewer mistakes and has a picture): https://www.math.wisc.edu/~maxim/753f13w7.pdf
Maybe it seems like a lot of work (since you can compute the cohomology cellularly in this case), but similar methods work for computing the cohomology of other interesting spaces (such as $BU(n)$).
