I believe segwit was necessary to fix transaction malleability, which was needed to enable the lightning network
Discussion
That’s the common claim. However, if I understand correctly, I heard recently that segwit wasn’t entirely necessarily for a second layer like LN. It would just work differently without segwit.