Now, there's a few different ways to turn a flashlight on and off, and they all have their good points and drawbacks. But one thing they have in common is their lifetime expressed in "cycles" which is the number of times a flashlight can be turned on and off before the switch fails.
The most common type of switch, it's not much different than the clicky switches that turn on lamps, small appliances and so forth. This type of switch has a spring and a couple contacts, with some type of mechanical apparatus to allow the user to cycle between the contacts being opened and closed.
Some of the really cheap flashlights have such cheap switches, their lifetime can be measured in only a couple hundred cycles, if that. I've seen cheap flashlights fail after a dozen clicks, and I've even seen that a couple times with high end flashlights.
A well made switch should have its lifetime measured in thousands of cycles before the spring sags, the contacts wear out, or the mechanism fails completely.
Mechanical tail switches found in most flashlights offer a convenient and easy to use interface that most people find appealing. But I question even the best of them. I just had a Thrunite Ti5 switch fail, and it was a $30 flashlight. Its cousin the Ti4 is holding up well.
So, with mechanical switches, it's kind of a lottery where you only know you won the lottery when you're flashlight has worked properly for a long period of time.
Downsides to this type of interface include people unscrewing the head too much and having it fall off in their pocket. But the real downside is that people tend to over tighten the head to turn the flashlight on. What's worse is that manufacturers tend to make the contact thinner than it would be.
So, theoretically this mechanism can last forever, but in practice it's only a little more reliable than a mechanical switch.
Most small appliances these days have electronic switches, and flashlight manufacturers have been making lots of models with this type of switch.
The downside to this kind of switch is that usually they are inconveniently placed and hard to find by feel in the dark, you know, when you really need a flashlight.
Another downside is these type of switches get bumped and tend to turn on in your pocket: no bueno. So manufacturers make the switch recessed but that only makes it harder to turn the flashlight on and off by feel.
I tend to prefer electronic switches, but manufacturers should be putting them on the tail and improve the experience. For flashlights with a mechanical switch, I usually stay away from the cheaper ones. Seeing that high end flashlights can cost 100 dollars or more, I think the switch isn't something consumers or even manufacturers put much thought into.