At the developed level where the composer doesn't give a damn about how easy it is for the musician to play, yes, both left and right-handers have to figure out how to realize the piece and would make use of their strengths to do so.
For instruments like guitar I think the case for reversing the handedness of the instrument is a bit stronger, since the hands serve very different roles there.
Even if that does not directly say that people (right-handers, specifically) insert their handedness bias into the things they write, it does certainly imply that that is important for people who write piano music to put the athletic part (the melody) in the more dextrous hand. It is not. The reason for the right hand to carry the melody is the sound projection of high notes, nothing to do with handedness.
Incidentally, many famous composers in the piano canon were lefties. Rachmaninov, Prokofiev, and Ravel all have strong evidence of being left-handed. CPE Bach may have also been a lefty, as may have Mozart and Beethoven. This is not "right-handed people making right-handed music" by any means.
I suppose that it's easier to start out right handed on guitar, though, when the right hand is more active than the left hand.
Personally, fretting with my left hand just doesn't feel natural. When I first got interested in playing, I asked a salesman at a Guitar Center about left-handed instruments. He handed me a standard guitar, and showed me the fingering for a G chord. It was uncomfortable, but that's obviously expected for the first time I'd ever held a guitar. However, when I flipped it around and fretted with my right hand, it felt much more natural. So ever since, I've played left-handed.
I think if I had a learned on a reversed piano - it would not transfer to a regular piano - I would be able to play better.
What which hand is responsible for (melody, accompaniment/rhythm) have very different dexterity requirements. Learning melody on the dominate hand would be preferable to me, in hindsight.
With an electronic keyboard, reversing the tones should be easy enough to do. However, I have not noticed that feature.
The motions involved in playing music are so weird that I don't think it matters that much. Even if it does, there might be techniques that you find easier to master with one handedness or the other.
I will also add that I have been complemented on the facility of my left hand when playing, but when I hear the people who say that play scales, it's very clear that they don't practice technique with both hands equally.