The Supreme Court ruled in Gideon v. Wainwright that people

accused of crimes have the right to a second trial upon request
that are under arrest must be read their rights by law enforcement
under arrest as juveniles have many of the same rights as adults
who cannot afford an attorney must be provided one by the state

who cannot afford an attorney must be provided one by the state.