This is done because these functions are nameless and therefore require some name to be called. But, this fact might seem confusing as to why use such nameless functions when you need to actually assign some other name to call them? And of course, after assigning the name a to my function, it doesn't remain nameless anymore! Right?
It's a legitimate question, but the point is, this is not the right way of using these anonymous functions.
Anonymous functions are best used within other higher-order functions that either make use of some function as an argument or, return a function as the output.
For example:
def new_func(x): return(lambda y: x+y)
t=new_func(3)
u=new_func(2)
print(t(3))
print(u(3))
OUTPUT:
6
5
As you can see, in the above example, the lambda function which is present within new_func is called whenever we make use of new_func(). Each time, we can pass separate values to the arguments.
They are usually used along with filter(), map() and reduce() functions since these functions take other functions as parameters.