In some sense, a lambda expression is the way to define a function from scratch.
You could write
add' x y = x + y
but that desugars to
add' x = \y -> x + y
which itself desugars to
add' = \x -> \y -> x + y
In the case of foldl (\x _ -> x + 1) 0 [1,2,3], you need to provide a function as the first argument. A lambda expression is a convenient way to do that without having to come up with an otherwise unused name for it. For example,
foldl someFoldFunc 0 [1, 2, 3]
where someFoldFunc x _ = x + 1
though one can also construct the function using other functions, rather than building it up from scratch.
foldl (const . (+1)) 0 [1, 2, 3]
Most would argue that this is less readable than either the explicit lambda expression or the named function.
\x -> ...part defines a function that mapsxto.... But fr your example, you could defineadd' = (+)andfoldl (+1) 0 [1,2,3], so you do not per se need to use a lambda expression.