Piano keyboards, that is. The arbitrary placement of black keys is very unsatisfactory. Musicians spend years learning how to transpose and so forth. Musical scores are similarly borked.

We could lay out a keyboard as a single row, thus

C C# D D# E F F# G G# A A# B C ...

but it would be rather wider than the current keyboard. The keys can't be made smaller because they have to fit human fingers. On a wide keyboard, it would be physically impossible to play certain chords. This will not do.

How about we add another dimension?

D F G# B D ...
C# E G A# C# ...
C D# F# A C ...

I've offset the rows slightly because it's hard to press two keys that are exactly aligned vertically. Also, it makes it easy to see that it is a progressive scale. This layout is somewhat similar to a computer keyboard.

Pianos only have one key for each note, because each key on the keyboard is fiddly and expensive. Electronic devices are cheap, so we can reasonably duplicate some keys: