Quick Accounting Equation Balancing Question

I was reading about double-entry accounting and came across the following examples:

  1. Purchase equipment for $10,000 cash.

  2. Buy inventory for $8,000 cash.

In both cases, the corresponding asset account will increase by 8000/10000. Cash will decrease by 8000/10000. So far so good. But additionally won’t an expense of 8000/10000 also be recorded and decrease the retained earnings account by the same amount? Won’t that cause an issue with balancing the accounting equation?

The question generalizes to purchase of any asset with cash or selling off any asset for cash.

Equipment isn’t an expense; it’s an asset. Depreciation of that equipment will be an expense, and the value of assets will decrease.

There won’t be an expense for inventory until it’s sold, whereupon it becomes COGS and the value of the inventory decreases.