many developing countries require you to declare your money on your way in and out if the amount is greater than 10k USD.

Let say you happen to win another 20k on your trip.
On your way out you need to declare 30k. In which case the custom need prove how you made that 20k.

how do you get prove? ask the casino to write you a note?

how else can you transfer the money out?

I know my friends just shove it in their bag and board the plane.