Koszul duality and $\operatorname{H}^*(BG)$ — concise proof? If $G$ is an algebraic group, then one can show $\operatorname{H}^*(BG,k)$ and $\operatorname{H}_*(G,k)$ are Koszul dual dg algebras, e.g. Drinfeld and Gaitsgory, "Finiteness questions for algebraic stacks", (7.2). Basically you  write $G$ as a pullback of two copies of the trivial map $\mathrm{pt}\to BG$ and use sheaf theory and base change. For this the group should be locally of finite type and characteristic zero.
E.g. the cohomology of $B\mathbf{G}_m$ and $\mathbf{G}_m$ are freely generated in degrees $2$ and $1$, respectively.
Is there a concise proof of this fact in topology (where I think it was first discovered)? Something that is different from the sheaf theory argument. For instance, does it follow more or less formally from writing $\operatorname{H}^*(BG,\mathbf{Q})=\operatorname{Maps}(BG,H\mathbf{Q})$?
Second, for what sort of topological groups is this theorem true? There are lots of topological spaces not coming from the above sorts of algebraic groups, e.g. mapping spaces $\operatorname{Maps}(X,G)$ for $X$ a topological space.
 A: I am posting this as an answer because it is a bit long for a comment.  Questions close to this one have appeared before on MathOverflow.  You ask specifically about Koszul duality, but for $k=\mathbb{Q}$, Koszul duality is a consequence of the more precise statement that $H_*(G;\mathbb{Q})$ with its Pontrjagin product is a free exterior $\mathbb{Q}$-algebra on finitely many generators in odd degrees, and the associated free symmetric $\mathbb{Q}$-algebra on those generators shifted in degree by one is $H^*(BG;\mathbb{Q})$.
This statement goes back to Borel and to Chern, with other important work by Bott in his "Bott spectral sequence."
Armand Borel 
Topology of Lie groups and characteristic classes 
Bull. Amer. Math. Soc. 61 (1955), 397-432 
https://www.ams.org/journals/bull/1955-61-05/S0002-9904-1955-09936-1 
Theorem (A) on p. 410.
As you indicate, one formulation of the result follows from the statement that the Leray spectral sequence of $EG\to BG$ has a special form, with each of the generators transgressive.  This is what Chern addresses with his Chern–Weil theory.  The approach of Becker–Gottlieb to the Adams conjecture also proves this result (the Adams conjecture was originally proved by Dennis Sullivan, from whom I learned everything in this "comment / answer").  There is also a very short proof in the following book of Félix, Oprea and Tanré.  It is "Proof 2" on pp. 39 –
40 of Algebraic models in geometry.
