I am sure that in the beginning most soldiers that volunteered for the union did out of simple patriotism (and perhaps out of a sense of adventure), The longer the war went on however the more likely they (and foreigners and Southerners) were to do it for monetary gain.Remember there were at least 500,000 foreign born troops and probably 200,00 "southerners" in the federal army. Many joined specifically for the "bounty"
From 1861 to 1865 the federal government, along with states and localities, paid about $750,000,000 in recruitment bounties. Congress authorized a $100 bounty in July 1861 to men enlisting for three years. With the passage of the Enrollment Act (March 3, 1863), three-year enlistees received $300 and five-year recruits got $400, but these sums were divided up and paid in monthly installments with the soldiers’ regular compensation.
The states and localities offered higher bonuses. Since the federal draft applied only to congressional districts unable to meet their manpower quotas, wealthy districts would often pay in excess of $1,000 to volunteers from poorer districts in order to entice these men to enlist. The poorer districts were thus inequitably affected by the draft because their volunteers were not counted toward their quotas.
Now $300 or even $1000 doesn't sound like much incentive for risking your neck for someone else's government. But a private's pay was only $13 a month at the time. The feds were offering anywhere from 2 to 6 years EXTRA pay on top of that! If you were a half starved Irishman or a poor white "southerner" that would sound pretty good!
Well meself and a hundred more,
to America sailed o'er
Our fortunes to be made we was thinkin'
When we landed in Yankee land,
they put a rifle in me hands
Sayin "Paddy, you must go and fight for Lincoln"