Is it nessesary to learn songs in order to progress as a guitarist? If I practice my technique and scales while learning theory is it enough? I have trouble learning songs and I do not know if I have to to get better. Thanks
you have trouble doing it, so learning them could help. Plus, it's fun and teaches you what other guitarists do.
If you're having trouble learning songs, then yes - it is necessary to learn songs. Not so much for the sake of learning those specific songs, but rather so you'll be able to play full songs that use techniques you're not already familiar with.
If you learn how to play certain songs that are in the same style/genre you play then you may pick up a trick or two from the guitarist that wrote that song. You also may learn how to play a lick and get inspired to rearrange it a bit and put it in a song of your own.

Its not mandatory that you learn songs in order to progress, but learning songs can only help you out in the long run!
I find it takes some of the monotony out of practicing a technique. Besides, what harm does it do?
My Gear:
Gibson Les Paul Vintage Mahogany
1993 US Peavey Predator with Texas Specials
Crate Palomino V16
Boss OD-3