It's a basically question of levels of abstraction and emergence.
If you studied physics you'll know about Ken Wilson (Nobel Prize 1982) of renormalization group fame, who showed that physics operates at a hierarchy of scales, each higher scale abstracted from the one below. Properties of a lower level can give rise to novel emergent properties at the higher level. For example, a water molecule isn't wet, wetness is a novel emergent property of the interactions of many water molecules. The same principle applies in fields of science - chemistry is based on physics, but can be studied without a detailed knowledge of the underlying physics by applying the emergent rules, biology is built on chemistry, but has its own behaviours & properties emergent from and abstracted from it. You don't need to understand the details of the layer below to do useful work at the higher level - so you can study ocean waves & turbulent flow without knowing the physics of individual water molecules.
Emergence means that the lower layer provides a facilitating substrate, a support for functionally unrelated patterns of activity; Conway's Game of Life is a good example - a static grid of binary (black/white, on/off, active/inactive, 'alive'/'dead') cells whose state is determined very simply by the immediately neighboring cells. The cells themselves aren't interesting, and the simple rules are the same for every cell, but depending on the
initial pattern of cell states, interesting
patterns of activity can occur when the rules are applied repeatedly over the grid. These patterns are not just interesting oddities, they can do stuff - for example
one pattern can act as a
Universal Turing Machine, capable, in principle, of computing anything computable;
another pattern can self-replicate like a kind of primitive digital proto-life; yet another can emulate Game of Life itself:
However, as you may have noticed, the GOL self-replicator is huge, extremely improbable to appear by random generation (especially as there is no selection in GOL) , due to the very restricted degrees of freedom in the interaction of the system - 2 dimensions, binary cells, and trivially simple relational rules. So achieving the necessary complexity takes huge numbers of them. But the rules and interactions of physics have vastly more degrees of freedom, giving chemistry a much wider range and complexity of emergent behaviours, and so-on, so achieving the complexity of a self replicator requires fewer interacting elements at the level of chemistry, making it far less improbable to arise as a result of cumulative random processes (with selection).
It is possible to conceive of simple replicators that depend on particular properties of organic chemicals - e.g. a variety of similar chemicals like the nitrogenous bases of RNA, that, in the right environment, will polymerize into short chains where each will attract a complementary base that will bind to its neighbor and form a complementary chain. If the environment changes, the complementary chain might separate from its template and attract its own set of complementary bases to form a copy of the original chain, and so on. Current hypothetical models of abiogenesis are far more sophisticated than this, but it highlights the potential role of environmental variation affecting the patterns of interaction of the molecules.
But particular properties of chemicals don't lead to sexuality, it's an emergent property of biology under natural selection; chemistry is the underlying functional substrate that makes the patterns of activity of biological systems possible, and the patterns of activity of biological systems can lead to the emergence of sexuality. Quite different levels of abstraction.
Ultimately, it's the energy gradients in the system that enable or drive the interactions at each level. Systems tend towards equilibrium, maximising entropy by energy dissipation, and it may not be a coincidence that energy dissipation is proportional to the complexity of the dissipating activity.
Another factor in the generation of complexity of living systems is self-organisation and self-assembly. This isn't a directed effect, but like crystal growth, it's a function of simple structural interactions between atoms or molecules. Crystallising water can produce symmetrical geometric shapes; polar organic molecules in solution, e.g. phospholipids, can produce membranes as their hydrophilic ends are mutually attracted, as are their hydrophilic ends, and they clump together. Such lipid membranes can spontaneously curve into a spherical bubbles - vesicles or liposomes.