Interesting, every person is different, some people are immune to the coffee effect, in my case, I can drink a black coffee at night and sleep 8 hours perfectly.
I assume that for some it create addiction since it has a strong effect in their body, I know people that can't function in the morning until they have a coffee. I have to admit that I always thought about it as interesting, they can take a coffee and stay alert, I would fall sleep the same.