If the posting is also extremely specific, I might suspect that it's meant for some bureaucratic purpose rather than a bona fide attempt to hire someone new. I once got very excited over a job that perfectly matched my background and interests. I later realized why: it was my current job and immigration rules forced HR to post an ad in order to renew my visa.
On the other hand, I also seen legit postings with very short durations. These are occasionally just...odd administrative decisions (welcome to academia!), but they are also sometimes extensions of a previous advertisement or search. It may be that they want to receive a larger pool of applicants before screening begins, or it may be that they intended to post the job for 45 days, but the site only shows ads for a month at a time. The date sometimes even resets whenever the ad itself is edited, even if it's just a typo fix.
If you know someone in the department, you can often informally enquire whether it's a real job or "saved" for someone. The hiring manager may not be permitted to flat-out refuse to hire someone else, but you could ask whether they're "expanding the group" and read between the lines. For some jobs, the ad might even be both. At the time I saw "my" ad, we would have been thrilled to hire me and someone like me and we had the money to do so. This is very unlikely for tenure-track jobs, but is a real possibility for North American postdocs, which are often hired opportunistically.
I also realized--far too late--that you aren't meant to begin writing faculty applications in response to a job ad. Instead, it is generally expected that you have prewritten material that can be adapted to each specific position. This is the only real way you can map out a coherent 5-year plan in a few weeks!
I agree that this can be very frustrating, but I also doubt that it's possible to completely eliminate it. It's mostly an interaction of rules meant for "interchangeable jobs" with huge potential applicant pools (e.g., cashier) with academia's extremely specific positions (how many people know about the response properties of PIT neurons?). In many cases, it's not even under the organization's control if it's required for immigration (etc).