It is not difficult for a beginning point-set topology student to cook up an example of a non-Hausdorff space; perhaps the simplest example is the line with two origins. It is impossible to separate the two origins with disjoint open sets.
It is also easy for a beginning algebraic geometry student to give a less artificial example of a non-Hausdorff space: the Zariski topology on affine $n$-space over an infinite field $k$, $\mathbf{A}_{k}^{n}$, is not Hausdorff, due to the fact that polynomials are determined by their local behavior. Open sets here are in fact dense.
I am interested in examples of the latter form. The Zariski topology on $\mathbf{A}_{k}^{n}$ exists as a tool in its own right, and happens to be non-Hausdorff. As far as I'm aware, the line with two origins doesn't serve this purpose. What are some non-Hausdorff topological spaces that aren't merely pathological curiosities?
This is similar to the variety example of $\Bbb{A}^n_k$. The topology on a scheme $X$ is almost never Hausdorff.
Indeed, if $X=\operatorname{spec}(A)$ is an affine scheme ($\operatorname{spec}(A)$ denotes the set of prime ideals of $A$) then we define a topology by taking $V(\mathfrak{a})=\{\text{primes}\:\mathfrak{p}\supseteq \mathfrak{a}\}$ for $\mathfrak{a}$ an ideal to be the closed sets. If $\operatorname{spec}(A)$ contains a pair of primes $\mathfrak{p}$ and $\mathfrak{q}$ so that $\mathfrak{p}\supsetneq \mathfrak{q}$, then every closed set containing $\mathfrak{q}$ contains $\mathfrak{p}$ also. Hence, every open set containing $\mathfrak{p}$ contains $\mathfrak{q}$. The consequence is that unless the poset of primes in $\operatorname{spec}(A)$ looks like $$ \bullet\:\:\bullet\:\:\bullet\:\:\bullet\:\:\cdots\:\:\bullet$$ you should not expect this topology to be Hausdorff.
It gets even worse. If $A$ is an integral domain, then $(0)$ is a prime ideal and it is a prime ideal that is contained in every open set. So, $\{(0)\}$ is dense in $X=\operatorname{spec}(A)$.