Desolate valleys, caves, and thorny areas were often places where people hid in times of danger (see Isaiah 2:10). People who were afraid would run there for safety.
However, Judah’s enemies would still find them. These hiding places would not protect them from judgment.