Why are D-sharp and E-flat considered to be two different notes

Why do the black keys on the piano each have two different names? If the posts on r/musictheory are any indication, this is a persistent point of confusion, especially when music theory teachers get all persnickety about using the correct name. This confusion applies to all of the black keys, but in this post, I’ll be …