Why a Bitcoin payment can have two outputs
An on-chain payment spends earlier outputs. A wallet can return the unused amount to itself in a separate output.
Follow the arithmetic
In the homepage example, 100,000 sat enter the transaction. The outputs total 99,800 sat. Subtracting the outputs from the input gives a 200 sat fee. The wallet sends 60,000 sat to pay the invoice and keeps 39,800 sat as change.
Why the larger output does not identify the recipient
Imagine the same input pays a smaller invoice of 30,000 sat with a 200 sat fee. Change is now 69,800 sat. Looking only for the largest output would point you to the wrong one. Match the destination and amount shown on your own invoice.