Back then samurais were needed for protection and/or war, the imperial palace would have them serve as guards, and some Lords or higher ups would have them go into battle, but now Higher ups and the emperor’s have highly trained body guards so there is no need for samurais.