One reason I can think of for not having long fingernails while playing the piano is the thought of catching a nail as you move around the black notes. Not a pleasant experience! Playing smoothly and quickly in keys which involve many black keys is also tricky, if not impossible. Long nails would really annoy you because they get in the way so much.
Try playing the first five notes of the E flat major scale with your thumb starting on E flat, and your fifth finger on B flat. Having long nails makes this uncomfortable and playing the notes more difficult. The fingers really do need to be rounded to play this position comfortably, with long nails making this impossible.
These are the most obvious reasons without going into detail about touch, smooth and fast playing, general agility around the keyboard, etc. But I'll just quickly mention that if you have long nails, it becomes extremely difficult to strengthen the first knuckle of the fingers (nearest the nail) if the fingernails are long. Being unable to put the fingertip on the keys means that it becomes impossible to round the first knuckle, which will effectively stop it from strengthening.