That is indeed the question. Argument 1: Why spend a fortune on a carefully computed lens just to add a piece of inferior glass in front of it? Argument 2: We need to protect the front of the lens in case it gets damaged. Better to replace a filter than a lens. Argument 3: Whenever was the last time you damaged a front element and anyway a broken filter can often mean the shard scratching the lens anyway, so back to Argument 1.
So today I thought I'd run a quick experiment to see how using a filter affects image quality. The kit was the Pentax K-1 coupled with a screw thread Super Takumar 50mm f/1.4 lens of the legendary 8-element type. I'm currently running this through my review process. Also on hand was the Asahi Ghostless filter. This is slightly curved to the same profile as the lens's front element, the idea being to reduce flare and reflections. The second filter was a normal flat Hama UV, commonly available second hand in 50p boxes everywhere.
I decided to just test f/8 and to use Imatest to check out the resolution of lens alone/lens plus Ghostless filter/lens plus flat filter. Distortion and CA were also measured. Firstly, distortion was hardly affected, measuring -1.52% barrel with lens alone, -1.55% with the Ghostless filter and -1.65% with the Hama. So there is a very slight increase in distortion with these filters
Then Imatest was run to look at MTF50 and CA.
The conclusion? Frankly, the filters made virtually no difference. So use them with confidence? Well, maybe, but maybe not, because it will depend on which filters, made by whom. I will still leave the filters in their boxes, with the exception of polarisers and anything else that cannot be done instead in Photoshop. But it does seem to suggest that a good quality filter need not be avoided after all.