i have a BMW 1995 540i, why it spents lots of gasoline?
It could be that the oxygen sensors are old.
You Mass Air Flow meter could also be dirty. Check you fuel line for leaks as well. The rubber tends to dry out and fuel is sure to leak.
I had a rusted fuel line on top of a gas tank that leaked when the vehicle was running and I used a lot of fuel. I didn't notice it until the leak got bad enough to run down the back of the fuel tank.
Looking for a Used BMW in your area?
CarGurus has 117,163 nationwide BMW listings starting at $900.