From wikipedia - https://en.wikipedia.org/wiki/Bounty_jumper

men who enlisted in the Union or Confederate army during the American Civil War only to collect a bounty and then leave.

A month after the Battle of Fort Sumter the United States Congress passed a law allowing for bounties up to $300. The Confederate government did likewise, starting at $50 and then later in the war increased the bounty to $100.

As the typical Northern private was paid $13 a month, the bonuses were considerable.

Risky, since desertion for them could mean torture or execution, but the money was really good for the time.