Will a battery spawn if you have none in your inventory? (Outlast 2)

Joining this sub solely to ask this question.

I just finished playing outlast 2. Sometime during the mine section my battery was running low, and I realized I had none left. Cue panic because I knew there was not a chance in hell I would be able to feel my way around these pitch black mines with Val and those branch people around. I was stuck in this small section of the cave, and after my night vision finally went out, I noticed a battery lying amonst some rocks.

It felt like a very odd place for a battery to be, and I'm almost certain it wasn't there before. Did the game spawn one because I didn't have any? Is that a thing?

It was the section of the mines where I have to climb the two ladders and then walk across the thin wood plank, the battery was on the bottom either on or next to a boulder. Any die hard outlast fans know which one I'm talking about?