Yes, exactly. The well temperated musical tuning [0] is "good enough". it's an approximation. Some pitches for notes sound almost the same and that's why they today are represented with the same key on a piano.
> For some reason I don't totally understand, some have 2 names (e.g. C#=Db, D#=Eb, F#=Gb, A#=Bb).
> For some reason I don't totally understand, some have 2 names (e.g. C#=Db, D#=Eb, F#=Gb, A#=Bb).
[0]: https://en.wikipedia.org/wiki/Well_temperament
Some famous music for the well temperament: https://en.wikipedia.org/wiki/The_Well-Tempered_Clavier