The accounting equation and the double entry system provide an explanation why a company's profit appears as a credit on its balance sheet.
Asset accounts usually have debit balances while liabilities and owner's or stockholders' equity usually have credit balances. When a company provides services for cash, its asset Cash is increased by a debit and its owner's equity is increased by a credit. The credit is initially recorded in a revenue account, but revenue accounts are temporary accounts that cause owner's equity to increase.
If the owner withdraws some cash for personal use, the asset Cash will decrease through a credit and the owner's equity will decrease through the debit part of the accounting entry. The debit might initially be recorded in the sole proprietor's Drawing account but this account is also a temporary account that will cause the owner's equity to decrease.
Generally speaking, the credit balance reported in the owner's or stockholders' equity section of the balance sheet reflects the owners' investments in the company plus the profits earned minus the amounts distributed to the owners since the time that the company began.