Nobody seems to like the first one, do they? It isn't wrong, but it is different in use from the second:
A: What are you looking at right now?
B: It is an apple on the table.
The A question introduces a specific but unknown object, the B statement describes it.
C: Is there anything I can eat?
D: There is an apple on the table.
C asks about an unspecified object, D introduces and describes it.