How does the Big Bang theory explain the existence and distribution of dark matter and dark energy in the universe?

How does the Big Bang theory explain the existence and distribution of dark matter and dark energy in the universe, especially given that these components make up the majority of the mass-energy balance of the universe, but cannot be directly observed and their properties do not fully agree with current models of physics?