Are the fish from which goldfish,koi,etc come from originally(carp I believe) purely ornamental fish, or are?

amya asked: they/were they ever bred or fished for eating?