Why are Stein manifolds/spaces the analog of affine varieties/schemes in algebraic geometry?

Also like affine varieties, we have:

Theorem. A complex manifold is Stein if and only if it embeds into some $\mathbb{C}^N$ as a closed complex submanifold.

For the "only if" direction, see Hörmander, An Introduction to Complex Analysis in Several variables, Theorem 5.3.9. For the converse, an argument is contained on pp 109-110 of Hörmander, immediately after the definition of Stein manifold.


I believe the reason for this is Cartan's 'Theorem B': for a Stein manifold $\mathrm{X}$ sheaf cohomology vanishes, $\mathrm{H}^n(\mathrm{X},-)=0$ for $n\geqslant 1$, and this property characterises Stein manifolds among complex manifolds. In the same way affine schemes are characterised among (nice) schemes by cohomology vanishing (this is a theorem of Serre). This comes up in the proof of the cohomological comparison result which is part of GAGA, see for example SGA 1, Exposé XII.