Greek and Roman Mythologies

Why were myths written?