Poetry evolved from the tradition of passing stories on orally from teacher to student. By using formulaic language --poetry--the stories were much easier to remember and increased the effect of the oral performance. The first people chose to write probably included this pattern, and therefore the most ancient writings are poetic [gilgamesh from the Sumerian legends more than 5000 years ago].
Prose is simply normal speech written down. Records of prose came much later and were not common until ultra-literate greek and roman societies developed.