This concept is used in the christian families (because they have a lot of children).
Usually everyone, offers a gift to everyone at christmas. But for big familly it's costy, and more we are, less you can spend on every gift.
To fix that, you put the name of everyone in a box, everyone pick a name, and noone knows who has pick his name, and fore sure you can't pick your name
At the end, eveyone has one but nice gift.
For this, I add the "lover" parametre, so you cannot pick yourself and your lover (because you have a special gift for her/him)