Devil may care

What is the etymology of “devil may care”?

“God won’t care if I’m careless, but the devil will take me to hell for my actions”? Hm. It seems that the devil wouldn’t care, since he can nab my soul the sooner I snuff it. And if I’m careless, it seems that a loving God would be more inclined to take notice.

I just thought it meant “the devil may care, but I don’t” as if to say that nobody should care.