You need a roof over your head, furnishings, medical equipment, office equipment, supplies for both office and clinical care, a way to maintain medical records, a system for billing patients and obtaining payments from patients and third party payers. You need staff to handle scheduling and other tasks, accounting and payroll services, utilities, insurance including health insurance for yourself and staff, malpractice insurance, and property insurance. Additional expenses may include advertising, professional dues and continuing medical education, and much more.
How much you earn depends on income (which varies by area and specialty) and costs (which vary by area and specialty).
There is a lot that goes into it and therefore many docs prefer to join an existing practice or to buy out the practice of a retiring practitioner. Banks do make loans for the estabilishment of a small business such as a clinic.