The term derives from the way in which a cat will give a cupboard containing its food superficial “love” (which is not normally exhibited) when it wants to be fed. The phrase is most often applied to human activity, for example when a child will say “I love you so much” before or after requesting a treat, for example an ice cream.
Cupboard love is a milder version of conditional love, where love is given solely in response to certain behaviour. Some local authorities class conditional love as a form of emotional abuse.
Info gleaned from Wikipedia