the Session works like this: each time you execute() on a particular Connection, that Connection is added to the state of the SessionTransaction, and remains open in a transaction until the Session itself is committed, rolled back, or closed. It's in this way that a Session coordinates multiple operations across many databases, and if twophase=True it will also call prepare() on all those connections before the commit.
So when using ShardedSession, if you hit three databases, they're all in that session's state.
Let's say you wanted to close out the first two. That may be fine, but how do you know that those connections aren't in the Session's state due to previous operations on those databases ? So it's something of a tricky problem, to say that you'd like to scan multiple database nodes with a certain SELECT statement, but then once you find the node you care about, close out the previous nodes. You'd have to check first that they weren't already there.
This is all doable though is not public API, to optimize this operation would mean you'd need to peek inside of Session.transaction._connections before and after the operation, then rollback() those connections you know you don't want anymore and remove them from Session.transaction._connections.
So that's what's going on, it's just I think if you try yo experiment with closing out individual connections from Session.transaction._connections it may become apparent that this is a bit of an intricate case.
Overall, I'd likely be using distinct Session objects explicitly in any case within a horizontal sharding situation; assuming I can make sure that the scope of a certain request is going to be focused entirely on just one of those shards, not unlike the solution you came up with.