Why can a planets day be longer than its year?

Not a problem. All it takes is that the planet's time to spin on its axis (its "sidereal day" length) is longer than its period of revolution around the Sun (its year).