A main reason would be that tastieness could make animals eat the fruit more, and thus spread the seeds from the original apple.
well, from a creationist standpoint, the apple is tasty because we need to eat it to get nutrients that would be hard to get otherwise.
From an evolutionist standpoint (though I do not consider evolution my strong point) The apple tree could spread better with a tastier apple. Also, natural selection would allow for less tasty apples (mainly Granny Smith) to spread less far because they taste horrible.
I apoligize for these views as I am not a botanist.