It isn’t. Settings > Privacy & Security > Wired Accessories

Set to ask for new accessories or always ask.

I have to warn you, it does get annoying when you plug in your power-only cable and it still nags you with the question. But it does work as intended!

You might want to check that charger. I have the same option set to ask every time and it never appears for chargers.