Why does a year on mars take longer than a year on earth?

Years on Mars are longer because a year defines how long a planet takes to orbit the sun, and Mars is farther from the sun so it takes longer to orbit the sun