How? The connection seems surprising.
Both come from the Latin saeculum, meaning, “age, span of time, generation”.
The evolution from saeculum to siglo is obvious: a century is just a unit or breakdown of time.
But in English, it evolved into the sense to mean “worldly.” While the religious concerns itself with the spirit and the “other-worldly,” it is the characteristics of time — growing, aging — that are are the most fundamental characteristics of this world.
Life in the real world, in other words, is defined by getting old.