The trio was so engrossed with the new books they only just made it to History of Magic before the Gryffindors. They were by no means late, actually they were extremely early, but coming after the Gryffindors would have been shameful.