Because DC is a weird jurisdiction. If I recall correctly, they can pass laws but since they are a district and not state, their laws must be sanctioned by Congress. Again, don’t take this as a perfect explanation because I’m sure the details are off, but basically they legalized and Congress said, “yeah right, okay.” Also important to note that since DC has no electable representation, it becomes difficult because, to whom do you make your complaint?
Edit: “In the House of Representatives, the District is represented by a delegate, who is not allowed to vote on the House floor but can vote on procedural matters and in congressional committees. D.C. residents have no representation in the Senate.”
Edit 2: “In Washington, D.C., cannabis is legal for recreational and medical uses, but is barred from commercial sale. Though the drug was fully legalized in the District following a 2014 ballot referendum, the United States Congress exercises oversight over the government of the District of Columbia, preventing the local government from regulating cannabis sales like other jurisdictions with authority derived from a U.S. state.”