How did the spoils system affect President James Garfield and his successor Chester A. Arthur? write it short

The spoils system, which rewarded political supporters with government positions, led to widespread corruption and inefficiency in government. President James Garfield was assassinated by a disgruntled office seeker in 1881, highlighting the dangers of the spoils system. His successor, Chester A. Arthur, enacted civil service reform in response to Garfield's assassination, ultimately leading to the Pendleton Civil Service Reform Act of 1883, which established a merit-based system for government appointments.