When the Confederate soldiers returned to their homes after the Civil War, they found little to do. So they went north looking for work. They were called a name that arose out of a tool they were carrying. A hoe.
The soldiers were walking the back roads, riding and jumping on trains, and sleeping out in the countryside hoping to find some kind of work. They were called hoe boys, which came to be called hobos.