There''s a huge amount of time and a huge amount of matter interacting in an orderly or predictable manner when they make contact. Don't forget that there's only a limited number of ways each type of particle can interact with another; it is not infinite. If the number of potential combinations is limited, repeatable simple molecules can occur, which can then build more complex molecules.... etc. So even though the paths of molecules may be stochastic (random), their properties are fixed, which reduces the apparent chaos with time and produces more systemic behaviour between them.