Not sure what the big deal is. But first and foremost, if the formula doesn’t make sense, you should be thinking about the math. Basically you have your Keynesian formula:

Y=C+I+G- IM+X

GDP= Consumption + Investment+Goverment Spending - Imports +Exports

And you have your Private Savings Formula:

S = (Y-T)-C

Private Savings(S) = Disposible income(total income-taxes)-Consumption©

Rewrite Private savings formula as a function of Y and subsitute into Keynesian Formula, solving for Net Exports (X-IM)

X-IM=S+(T-G)-I

So now you have Net Exports(Imports-Exports) =Private Savings +(Taxes-Government Spending) - Investment

Whereby (Taxes-Government Spending)= Government Savings

This leads us to your equation:

exports - imports = private savings + government savings - domestic investment

Now that it makes sense mathmatically. What does it mean?

In equilibrium, the trade balance, aka net exports, must be equal to both private and government savings minus whatever the firms decides to invest. Generally, what firms want to invest must be equal to what people and the government want to save. Hence the IS relation, or Investment equals savings. When there are imbalances in this, that’s how trade deficits and trade surpluses are made.

A trade surplus must occur when you have more total savings than investment; likewise a trade deficit must occur when you have more investment than savings.

So basically, for a given period, if country x has more investments than it saves, they must have more imports than exports, thus they are net borrowers and they have a trade deficit. Likewise, if country x saves more than its investments, they are must have more exports than imports, thus they are net lenders and end up with a trade surplus for that period.