You can make a case for all three.
There are two breeds that have this trait as a main focus:
However, in a population of feral/barn cats it could also be the manx gene at play, rather than the bobtail gene.
The lack of a tail (or a shorter than normal tail from birth) is caused by a gene. However, it's more complicated than that. By a lot, but basically it works like this:
If you have a bobtailed cat with no tail, and you breed it to another the same about 25% of the kittens won't be born due to birth defects (or will die shortly after birth), 25% will have some sort of stub, and 50% will have no tail. If the cat truly has no tail there are health issues commonly associated, usually lack of muscle and problems with their sphincters.
However, if you breed a bobtailed cat with a stumpy tail, to one with a longer tail it works out like this: 25% long tail, 50% stubby tail, 25% very short/no tail.
Basically, if there's even a little tail the chances of problems associated go down.
The manx gene works similarly, but is more likely to cause kittens with no tail at all to be born than in the bobtailed gene. Therefor, the manx gene causes more sphincter problems. It's also associated with other skeletal issues.