This is not a boring test you had to sit at school but the exciting discovery of how sound works and why your favourite songs are your favourite songs. It explains the reason some notes do not sound good together but others do. It helps us work out tunes quicker. It equips us with the knowledge to play faster solos, cooler riffs, more interesting chords and to understand harmonies.
Learning theory will allow you to, as well as improving your playing, understand how best to play with other musicians and gives you the freedom to run all over the fretboard and not hit wrong notes.