If everyone involved in the process of accounting followed their system or no system at all, there's be no way to truly tell whether a company was profitable or not. Most companies follow what are called generally accepted accounting principles, or GAAP, and there are huge tomes in libraries and bookstores devoted to just this one topic. Unless a company states otherwise, anyone reading a financial statement can assume that the company has used GAAP.
If GAAP is not the principle used for preparing financial statements, then a business needs to make clear which other form of accounting they're using and are bound to avoid using titles in its financial statements that could mislead the person examining it.
GAAP is the gold standard for preparing financial statements. Not disclosing that it has used principles other than GAAP makes a company legally liable for any misleading or misunderstood data. These principles have been fine-tuned over decades and have effectively governed accounting methods and the financial reporting systems of businesses. Different principles have been established for different types of business entities, such as for-profit and not-for-profit companies, governments, and other enterprises.
GAAP are not cut and dried, however. Their guidelines and as such are often open to interpretation. Estimates have to be made at times, and they require good faith efforts towards accuracy. You've surely heard the phrase "creative accounting" and this is when a company pushes the envelope a little (or a lot) to make their business look more profitable than it might be. This is also called massaging the numbers. This can get out of control and quickly turn into accounting fraud, which is also called cooking the books. The results of these practices can be devastating and ruin hundreds and thousands of lives, as in the cases of Enron, Rite Aid, and others.