In a broader sociological sense (unrelated to the slang), this refers to a situation where a process is easily moved in one direction but difficult to reverse, often used in economics or government spending.
The 2004 song "Do the Ratchet" by Anthony Mandigo (and later versions by Lil Boosie and Hurricane Chris) turned the word into a lifestyle and dance movement. The Evolution of Meaning
To describe a fun, high-energy environment, especially in music (e.g., "ratchet R&B") or at a party where everyone is letting loose.
Like many slang terms, "ratchet" was reclaimed by the community it once mocked. It became a way to describe being unapologetically bold , loud, or having a high-energy "party" attitude.