Recent algebraic structures of string theory, including homotopy Lie algebras, gravity algebras and Batalin-Vilkovisky algebras, are deduced from the topology of the moduli spaces of punctured Riemann spheres. The principal reason for these structures to appear is as simple as the following. A conformal field theory is an algebra over the operad of punctured Riemann surfaces, this operad gives rise to certain standard operads governing the three kinds of algebras, and that yields the structures of such algebras on the (physical) state space naturally.