In addition to the things already mentioned, signing bonuses you receive immediately are great for people coming right out of school, or from low pay from academic research jobs or their own scrappy startup.
It helps with any incidental debt that was accruing (separate from student loans), as well as immediate expenses related to the lifestyle bump (e.g., move to an apartment that would pass inspection). Which also benefits the organization, by unburdening the hire of some of those distractions from work.
I suppose a requirement that the employee pay back the bonus if they leave within a certain period is additional incentive for the employee to be genuinely interested and committed, not intending to job-hop for the next slightly-better salary or more promising lottery ticket.