Reptiles determine their sex from environmental factors, alligators for instance will become all male, all female, or a mix depending of the temperature in the nest. Also, species of fish can change their sexual expression according to environment and other factors.
Cannabis as a plant expressing distinctive sexes (dioecious) are actually a rarity, most plants are monoecious with both male and female organs expressed on the same plant. Given these facts, and the fact that cannabis can be stressed or manipulated to go hermie, it builds a pretty strong case that the sexual expression indeed is influenced by the environment.
The evolutionary advantage is obvious, as seedbearing plants both needs more time, and good conditions regarding anchorage and nutrient availability for success.
The single most important aspect according to my knowledge, is to provide for deeper sprouting pots, as the unhindered downward growth of the taproot helps the seedling determine if there's anchorage and a big enough pocket of soil to sustain seed-production.
The rest of the factors is meant to replicate the conditions of early spring, to let it know it has plenty of time to ripen seeds.