There are two likely causes in my experience. #1 is a short in the speaker wire, usually in the dash behind the head unit from previous owner messing with wires, or in the door jam where the wires move around every time the door is opened, or at the speaker because a previous owner messed with that.
The one thing I haven't seen mentioned yet is a partially blown driver/speaker. Sometimes when the voice coil in the speaker gets partially fried, it will still sometimes work if you get the coil to move within the magnet. Then if it rubs on the magnet it stops working again. Usually due to a short where the coating on the coil wires is melted and then contacts with the permanent magnet. Really the only way to test that is to swap both the front speakers with each other and see if the issue changes sides. It's very common with stock speakers, people just crank the volume and the distortion from driving them so hard with a low power amp melts things.