The clustering of Black’s pieces makes skewering possibilities harder to see than if the targets were aligned with plenty of space between them. You can simplify analysis by viewing the Black position in light of whatever offensive pieces you have positioned to attack it—a significant limitation, since the center is full of pawns that obstruct the paths of your pieces. But White does have a dark-squared bishop on a3 that is outside his pawns, and Black has the alignment of queen and rook—and on a dark-squared diagonal—that we have seen can form the basis of a skewer. So Bxd6 is the idea, and of course it might just as well have been seen by methodically looking at any captures you can make.
A piece that runs a skewer through the enemy queen, like a piece that pins the enemy queen, needs protection to prevent the enemy queen from gobbling it up. After Bxd6 White’s bishop would have none, so White asks if he can add a guard to that square. He seems to have no way to safely move a piece into position for the purpose, but consider also what you already have aimed at the square that might be brought into play by moving things out of its way. Here White has a rook pointed at d6. Granted, there are two pawns in its way, one White and one Black. But a pair of pawns like this, two ranks apart and especially in the center, sometimes can be removed with a single exchange. Thus White removes his own pawn from the d-file violently with d4xe5. If Black replies d6xe5, suddenly both pawns are out of the way and the path of the rook—White’s guardian of the skewering square—is clear. White plays Bxd6 and wins the exchange after Black’s queen moves. (And if Black allows you to play d4xe5 with impunity, that's fine, too.)