Yes, a cross connection is always a possibility. There is quite a bit about those under a post by JKV a few down from this one. Another is that you have a deadband problem, where there is considerable leeway in the control. So the control lets the tank cool off more than it ought to before firing to bring the temperature back up to what the thermostat has been set at.
I have that myself. Sometimes the water is very hot and sometimes lukewarm. The only fix is a new control or new water heater, however I find that if I run, say, a sinkful of hot water ten minutes before I take my shower, it will “wake up” the water heater and make it fire and the water at shower time will be properly hot.