iPad not charging - what's the logic?

My iPad sometimes says “not charging” even when plugged in. I can sometimes guess why this might be - connected to a computer, etc. But in this case, it charges when on but once the cover is closed it won’t charge.

Why? What’s the system logic and what is being protected?

I don’t think it’s a feature. My iPad charges when the cover is closed.

I had an issue once where either my iPad or iPhone wouldn’t charge when plugged in. I turned it off and back on and that fixed the problem, so I’d try that.