For more power the engine needs more fuel to burn n to burn more fuel the engine needs more air. Fuel can be added easily while adding more air is the tricy part.
The purpose of the lamda sensor is to give feed back to the ecu about the strenght of the mixture. Supposedly if a car has 20% weaker misture then it would defenitly get 20% added power; other wise the lamda helps to constantly adjust the amount of gas being fed to the engine.
The need for it arised for the same reasons which r present while driving on petrol,e.g, the change in %age of oxygen content in the atomo. The change could be due to any reason,i.e, temprature, humidity, altitude height etc.