The signature collocation is 得了便宜还卖乖 ('got the bargain AND plays the victim') — used to call out someone who benefits from a situation but pretends they were hard done by. The other sense ('flaunt cleverness') is plainer.
memory
卖 (sell) + 乖 (well-behaved/clever child) — literally 'selling the good-kid act.' Picture someone performing innocence for the audience.