What does a samurai work for before becoming a samurai?
A Samurai is a feudal rank in Japan. You had to be born Sumurai in order to be one.
"Samurai" was a hereditary title, meaning you were born into a samurai family and had no choice about becoming one. If not born samurai it was essentially impossible to become one, as samurai status was something that was given or taken at the will of the local daimyo (lord). And since the title and its associated benefits was considered the highest honour, the title was given to non-samurai families extremely rarely.
Samurai is a class like caste and it's hereditary. Therefore, the sons of farmers were destined to be farmers and samurai's son were samurai. However, there were rare cases for some to be in samurai class. One is to show great talents in swordsmanship and others include becoming great scholars. It's very rare, though. Inside the samurai class, there was also hierarchy, and it does not always mean upgrading the status if one becomes samurai…