-snip-
I was under the impression that if you had multiple possible buckets which could cover a specific transaction, Electrum would select the bucket with the fewest inputs, but actually reading from line 453 onwards, it seems Electrum actually tries to choose the bucket which will produce the most private amount of change.
Furthermore I don't use the right click context menu "Spend from" to manually select the addresses
which should be used for the next transaction.
On a slight tangent from your question, you can also click on "View -> Show Coins" to display an additional "Coins" tab across the top of Electrum. This tab shows every unspent UTXO in your wallet, and which address they are stored on. If you have multiple inputs on a single address, then this makes it possible to not spend them all at once if you don't want to, unlike the "Spend from" option.
If you have any interest/concern in Electrum spending specific inputs for your transactions, then really you should be manually selecting those inputs for each transaction.