I can't give you the exact flap setting used but they are normally 5 or 10 degrees , set by the manufacturer. Many aircraft have a choice of two settings. A flaps up takeoff would require the aircraft to rotate at a very high speed, near or over 200 knots. This would be dangerous in event of an aborted takeoff. Current regulations require commercial aircraft to be able to accelerate to V1 speed and still stop on the runway. This distance may be exceeded without flaps on most runways. On large jets, most fields are somewhat short. Most large jets need about 6000 feet or more to be legal at max weight. If your runway is 8000, that is a short field. The use of flaps also help the aircraft's climb gradient(height per distance). This is required because to be legal, commercial aircraft must meet specific climb gradient profiles for safety. The whole V1, VR, V2, Vfto and the 5 stage climb requirements are not well understood my most pilots. Dispatchers with computers figure the numbers you need to be legal before each takeoff, many variables go into the computation of performance speeds. The pilot ensures that his weight, flap setting,Stab setting, runway and winds are as planned by the dispatcher, then their legal and safe for takeoff.🙂