If the weather is warm during the early stages, onion seedlings will grow vigorously until cold weather slows their development.
If a cold snap suddenly occurs, the onions will have grown to sufficient size to sustain flowering, and thus be forced into early dormancy.
As the weather warms again and then moves into winter, they may be confused into thinking they’ve already gone through two growing seasons. Just like they’re programmed to do in their second year of life, they prepare to set seed the following spring for the next generation of onions.
Young seedlings that are less than the diameter of a pencil by the time temperatures drop aren’t affected by their first winter. Their size isn’t significant enough to realize the cold is upon them and they have to initiate flower stalk production.
Plant too soon, and your whole onion crop could flower the following spring as the bulbs will have grown enough to think they’ve completed their cycle after winter. Plant too late, and you could end up with smaller bulbs, if the delicate seedlings are strong enough to withstand winter at all.