The polite thing to do (in my view) would be for Associate 1 to decline his cake so that Client could have it -
When I'm the boss, I'm the one who passes up the cupcake so that *my* client can have one.
I'm the one who passes up the cupcake so that *my* employee can have one.
I am the one who is at the top of the totem pole, and I am the one who benefits when my department (and even more so if it's a business I own). Therefore it is *my* role to make sure the other people around me are happy and feel appreciated.
Outranking someone, to me, does not mean that I get all the privileges. It means that I get more money, I get the decision-making authority, and I set the standards. Sure, sometimes I get the privileges they don't get, but that's not the main determiner of things like this.
Now, this is "Associate1," and maybe his client doesn't benefit you at all, and maybe he doesn't report to you in any way. In that case, then yes, Associate1 would be the one to pass up the cupcake.
There was a thread here once of an admiral who took a too-big helping of an office treat and left all the lower-ranking people without. It was NOT admired by the people around him, nor the people here. And in fact, Associate1 sure didn't look good either!
I think you and Associate2 did great.
(If I were the client, I'd hang back a bit, thinking that these cupcakes weren't for *me*. But if I were delivering cupcakes, I'd be bummed out that I hadn't thought well enough to be sure I did put one of my new neighbors in this position. And in fact, this is sort of a reason why I think cupcakes aren't the best "hi, I'm a business person who will be working near you" thing.)