I think the taste of stronger beverages like coffee / beer (or alcohol in general) is just one of those things that people acquire with age
I didn't have the ability to taste the differences between roasts or hops when I was younger (below 18), but now I can drink expresso or a beer without being overwhelmed by a general distaste
aka drinking something and saying "wow it taste like alcohol or coffee" and actually being able to determine what's in it and the textures