I can think of a few reasons.
If you want to mechanically add a filter between you lens and you camera (lens attached to filter attached to camera):
It will change you lens basic characteristics as it adds distance: adding a filter between you lens and your camera will have the effects of an extender (focal length and aperture will change for example).
You will add one more source of movement between lens and camera if your can tighten the whole 3 elements correctly.
The filter will have to be resistant enough to maintain the lens on the body. So you will probably end up with a huge filter with the same mount as a lens.
Your filter will have a hard time being compatible with all lens/body because they all have different electrical connections.
Sealing might be a problem for weather resistant body/camera combo (the effort exercised on the filter will be greater).
If you want to mechanically put it "inside" you lens (or your camera) and still attach your lens to your camera (lens attached to camera, as usual):
You still have to find room for electric connection between your camera and your lens. As you can see on most lenses, there is not much surface available.
You need space to screw you lens with your finger. You will probably need a tool to screw it inside your lens/body without adding fingerprint on the filter.
You will have one more chance of adding small pieces of metal/plastic in your body/lens as you screw/unscrew filter on the thread.
For both options, you probably won't be able to stack filters.
Of course adding a filter inside the lens or the body will have the advantage of having a unique diameter of filter for all lenses. That would be the one (and only ?) advantage of such filters.