That's interesting... only because I was under the impression,
while laying down torches, that I was noticeably reducing the enemy spawn-rate of hostile areas in my game, especially in places such as the Underground Jungle & even near spawn. If it's the case, that light-levels have no effect on enemy spawn,
at all, what's happening here exactly? Oftentimes I can brush things off as just being
immersion placebo, but this one I was pretty sure about.
Side Note: The only experience I've ever had that proves your correction true, is me using a combination of infinite Night Owl Potions & Shine Potions while exploring in Journey Mode. Torches seemed unnecessary & there didn't appear to be any increase to enemy spawn-rates. Since light-levels having no effect is obviously the case, what is effecting enemy spawn (aside from the obvious stuff)?
Well, this was even the case...
or at least it felt like the case, in 1.3.5. I'm hoping there's something to this,
some kind of overlooked explanation, because if everyone starts shrugging their shoulders, I may just have to pull up some
very old Hardcore Adventure footage, showing an
undeniable example of exactly what I mean.
Notably, there was a pitch-dark area in the Underground Jungle, that I couldn't even
peek into without being sniped by Wasps, but even with the help of a Flare Gun, I was able to clear the area out somewhat
(more like, break up the crowding). After laying torches, the spawn-rate of the Wasps appeared to be a LOT more manageable, compared to when the area was just pitch-dark.
I'll preface this by saying: if there is any actual impact of light levels on enemy spawns, it is entirely unknown to all of the coders of Terraria. Its theoretically possible that there has been some sort of bug all this time, but in practice, it isn't. For starters, according to Yoraiz0r, server code doesn't even register light levels, its calculated all client-side, so how could enemy spawns rely on light levels when the server-side enemy spawn code has no access to the client-side light code? Of course, a possible retort to this is that "maybe the light spawn code only works in single player", but if the effect was so profound and only worked in single player, why haven't we been inundated by a decade of bug reports for it? I've seen 10x more subtle bug reports for sure.
If I had to guess what you are experiencing, its purely a perception issue. Enemies do not spawn on you, they spawn off screen. And while spelunking, what location is most likely to be lit up? Where you are currently standing, and the path behind you. So the enemies will appear to be coming out of the darkness while exploring, because you haven't been there yet, and so haven't lit that area up. That explanation wouldn't apply to pre-lit areas, but exploration often falls under these circumstances.
There is also the possibility (and this can definitely have an impact) of the enemy spawn cap being reached, with enemies spawning in dark, enclosed caves. When you are walking through the Underground Jungle, you have your main explored area/tunnel, and its all lit up. And then you kill those enemies. But you never see, or kill, the enemies in the undiscovered caves nearby. As you kill enemies in the lit area, more enemy spawns occur; some of these will be in the lit area, but some of them will also be in the undiscovered caves. As you continue this process, over time, the undiscovered caves will become saturated with enemies, while the lit up area will become safer and less populated. And then suddenly you "break into" said undiscovered caves and are swarmed by enemies coming out of the (you guessed it) darkness.
But the connection here isn't darkness = enemies. There is a correlation, not a causation. Tunnels where the player explores are going to have less enemies; tunnels you do not explore will have more. Tunnels the player can't see are less likely to be explored. Therefore, it is a causative action on the part of the kill-seeking player that results in enemy swarms skewing towards dark/unlit areas, while thinning the swarms in the lit areas. When you are running around back and forth clearing out enemies in a large cavern somewhere, you are going to be slapping down torches as you go. But the player is the force causing the impact on enemy quantity, not the torches. If you did the same thing, entirely without light (just using Hunter Potions or something), you would likely observe the same phenomenon in action . . . although the Hunter Potions themselves might break the illusion because you will be constantly seeing the hidden enemies in the side-caves.
The Spider Cave example is perfect for this, because when you park yourself IN the lit up spider cave, you are going to get very few spawns (usually from off screen sections of the Spider Cave. And then as you explore a bit, you'll find the nearby caverns filled to the brim with Spider spawns. Areas that are unexplored/off-screen are less likely to be lit up than areas where you currently are.
So . . . in summary?
Is it possible that there is some accidentally, as-of-yet undetected spawn-impacting-light mechanic that was not added by Red or Yoraiz0r, some accidental bug that has been impacting enemy spawns since the days of old? Sure, its very difficult to disprove the existence of something except by calculated observation. However, there are logistical issues with this possibility (server-side light levels, for instance, would not allow this to happen in MP), and the idea that Terraria had a bug
accidentally created the precise mechanic by which its primary "comparison game" is known for, seems a bit of a stretch to me. It is far more likely, in my assessment (as someone who has a Master's in Psychology/Counseling) that it was a placebo-style confirmation bias induced in players who came to Terraria fresh off the heels of Minecraft and applied their well-honed Torch placing skills to this new experience.
It doesn't help that Engine put in a tooltip "confirming" it either. I brought that up for removal the moment I found out about it.
Positive Torch Luck iirc might be able to lower enemy spawns? I might have to look into that.
IIRC, luck does have a minor impact on the spawn rates of a few particularly rare spawns (stuff like Goblin Tinkerer and stuff). Torch luck alone is unlikely to have a human-perceptible impact on such spawns, and would almost certainly not have an impact on global enemy spawns to such a degree that it would be noticeable. And the fact that the mechanic didn't exist at all prior to 1.4 would definitely take it out of consideration for Toxophilite's observations. We'd be talking like a 5-10% higher (or lower) chance for a handful of rare spawns to happen/not happen. These same spawns take up something like 1-5% of the typical spawns you are likely to see, and would have no impact at all on swarmy enemies like Hornets or Spiders. We'd be talking something like a 0.1-0.5% fractional increase/decrease in total enemy spawns, a far cry from what is being described here.