These cars are expensive to fix, even if you DIY. For that reason alone, I would recommend a warranty. Ours paid for itself quickly with the blower motor going out, windows falling into the doors 3 times, cup holders getting stuck, valve cover oil leak, oxygen sensors going bad, and a few others I know I am forgetting about.
Just recently the warranty expired, and then the eccentric shaft sensor went out. I fixed it myself ($2k repair at the dealer) for around $500 and 6 hrs of my time.
Other things some warranties offer is rental reimbursement. Get a good one "platinum" or "premium" or you are wasting your money.
The car mentioned above is an 06 325i purchased at ~48k miles 5 years ago, now has 83k miles only used for daily driving too and from work.