You've brought up quite a contentious matter between English users - how the number of the verb should relate to the number of the object/subject.
In your case though, it's simply because it is two noun phrases joined together using 'and'. That is, both noun phrases correspond to one verb (and one prepositional phrase - on the table). The sentence is really:
'There was an apple on the table and there was an orange on the table.'
You are just paraphrasing this into one clause, rather than two clauses using the same verb. The verb is talking about one apple, and one orange, so it's a singular verb.
Student or Learner