Some points/partners post almost instantaneously. They're "live" with the airline or hotel and points post just as soon as the merchant gets around to it.
Others send over points in batches, on a tape, perhaps only once a month. Depending on when you earned points in their cycle, you might miss one transfer and the next one could be a month away, and then a bit of time until the airline runs the tape.
Shopping merchants tend to take longer to post, precisely because of the potential for item returns as noted above.
But in most cases there's absolutely no reason for miles to take as long to post as they do... Amex is good about posting points for monthly charges, but notoriously slow about posting bonus points for instance (try 12-14 weeks!).