Wikipedia only attempts to explain the origin of the riding distance event but not why the term was used and why it "stuck".
A distance of 100 miles (161 km) is often referred to as a century. Century is also a common designation for 100 years, but that is not its exclusive meaning. The English word derives directly from Latin centuria, a group of 100 [etymonline]. This is a form of centum (or CENTVM if you will) which simply means (one)hundred.
A ride of 100 miles is thus aptly named a century ride, without having to resort to metaphors or figurative meaning.
Chris H mentioned another instance where century is used to count something other than years: In the sport of cricket, a century is a score of 100 or more runs in a single innings by a batsman [wikipedia].
If I read Google correctly, it isn't that a century necessarily means 100-years and a bike event borrowed from that. Instead, they are peers of one another.
The Latin root, centum or centuria simply means 100. In a more generic sense, it can simply refer to any collection of 100 definition.
Thus, a century in time is a collection of a common unit of time (year) and a century in biking is a collection commonly used units of distance (miles) or (km) for a metric century. The are both likely derived from the same Latin, not the later from the former.