When buying a business you often pay for
goodwill which is very hard to value and can be substantial portion of the price. There often are other factors, such as leases, existing staff, etc. You really need to do considerable due diligence to know what you are buying. The vendor's reasons for selling are a critical consideration as well.
Of course, if you can see how the business can be improved it could be a fast track to profits compared to starting from scratch.