This timer is required to separate wake period activities and function from regeneration perios and function. The 2 can't go one at the same time, because the machinery used in both periods is the same. The machine is either generating consumables, or using them.
Why not ask the "God designed it" folks on this thread what need there was for God to insert an independent and redundant timer? Does your skepticism only run in one direction?
In any case, there are plenty of good reasons for organisms to have internal timers which don't rely on light triggers, for example so that the organism will still "wake up" if in a shaded area blocked from light, or so that it can anticipate dawn or dusk (so that it can be out and ready to catch prey that arrive at the crack of dawn, etc.)
and how could it have happened upon this rather complex one that has nothing to do with light in response to light?
By selection. Processes which were linked to chemical cycles which happened to have cycle times which were close to the daily cycle (or an even fraction of it, like six hours) would be selected for.
Why have a circadian rhythm independent of the day/night cycle?
One answer off the top of my head is that there is definite survival value in getting up before your predators (or prey) do.