It was the constitution because they wanted to establish a better government.
Gideon v Wainwright guaranteed that all defendants are entitled to an attorney, regardless of the severity of the charge. You can waive this right if you do wish, but all people can have one, either your own private lawyer, or a court-appointed one.