Judges driving spending

Why is a judge order the executive branch to spend money that hasn’t been authorized for distribution by the legislative branch?