I'm not saying that they can't coexist, nor that one can't be adapted to another water condition. I am merely stating the accepted view as to what each fish prefers.
Fish can be acclimated to live outside of their preference, but it should be noted that it is going against "conventional wisdom" doing that. The general consensus is that cardinal tetras prefer soft water and acidic water, while platies prefer moderately hard and basic water. It doesn't mean that the fish can't survive in different conditions, it just means that I wouldn't do it.
My water is fairly soft and slightly acidic. My fish are all those who prefer those conditions (or in the case of the guppies) have such a wide spectrum of hardiness that their preference overlaps my conditions.
In general, when selecting fish, I think the best practice is to let your water be your guide in determining what fish would be the most compatible in those parameters. That isn't to say that you can't go a different way, it is just saying that trouble may be encountered down the line, and you may not understand why. For beginners, I think it best to stick with fish that all have similar water preferences and that they match your own tap water. After years of experience, you can begin to experiment with more complex set-ups. But, in my opinion, it is best not to take on too many unknowns as a beginner. If the entire fishkeeping hobby is a new one to someone, then I would suggest that person try to limit their vulnerability to problems. Ultimately, that is the best way to enjoy the hobby and be successful, not to mention best for the fish entrusted to your care.