One explanation would be that in aniline (conj. base of left molecule) the nitrogen lone pair (in a p-orbital) is delocalized into the benzene ring stabilizing it compared to pyridine (conj. base of left molecule) whose nitrogen lone pair is in a sp2-hybrid orbital and is not delocalized. In other words, the pyridine nitrogen lone pair is more availble for sharing since it is not delocalized.