It is intentionally (mis)represented as a pension plan where contributions are connected to benefits but that fiction is solely to maintain popular political support, they can disqualify citizens from eligibility at any time regardless of contributions and, on occasion, have.
The main issue with Social Security is that most people in prior generations took far more out than they contributed, in part because it wasn’t really a requirement since it wasn’t actually a pension.