Learning scales on the guitar is important for a few different reasons. They build strength and independence in your fingers in a way that is not possible just playing songs. Playing guitar scales also helps to train your ears to recognize common note combinations. They can also be used as note choices in your guitar solos and for melodies in songwriting.
Playing chromatic scales on the guitar not only helps build technique but also helps your understanding of the guitar fretboard.