The samurai were eventually abolished as a class for economic reasons. After the Meiji Restoration when the central government absorbed the debts of all the prefectures, they realized they couldn't afford to pay the stipend of every samurai under the laws of feudalism.