An interesting question OP. Are you UK?
A slice of party cake in napkin sent home in party bag has been traditional (in the several UK counties I lived in) for 40+ years.
PPs have a point, as many play venues don't give enough time to dish out cake, expecting you to frantically slice and party bag it, as they have already done deserts like icelollies or icecream as part of the package - most DCs are full by then and itching to run around again. If you ask children most say no to having any cake then as are full. At home you have more time.
When we have parties at home, I do cake after the meal and ask children if they want their slice now or put in their (named) party bag to take home. As that's our main 'afters' although I also have various other deserts like minirolls and chocolate sticks etc. available which can equally go in party bag if they've eaten their slice. They have to sit up table to eat it though or be in the garden as by then young children are often on the move.
It's far easier with older children. By age 11+ , we eat any cake straight away or bypass it entirely, as we don't do party bags for that age upwards. Unless it's themed party (such as taking some makeup home from a girls dress up party, or the t-shirt they've painted)
I had parents comment (jokingly I hope!) And one mum complain once to ask where the slice of birthday cake was ("it's in your DS's tummy!") for DD's (6 year old) party as she said she looked forward to it and thought I'd forgotten to give her child his slice in his party bag... She went to the effort to suggest I could send his slice in on Monday ...😆
I'd actually prefer birthday cake was eaten at the party when mine attend, as my DC rarely eat napkin cake slice later once home... They're too busy bouncing off the walls when they get home from all the other sugar! I'm afraid I regularly bin it. On reflection it does seem a weird party tradition, but when it's an expected cultural norm it's difficult to see different choices.
To not share out cake at all though, is tight.