Windows has to make a tradeoff between throughput and latency.
If it kept applications in RAM, even when they hadn't been used for a long period of time, throughput would suffer. The used, but idle physical RAM would reduce the RAM available to other applications and the system.
Windows makes the decision to page out memory that has not been accessed in a long time. This allows more physical RAM to be used as a disk cache, and it significantly improves application throughput.
The tradeoff is that when these applications eventually do need to access the memory pages that haven't been accessed in a while, they may not be resident. In this case, the application has to wait for a moment as they are read back into RAM.
Windows generally does a very good job of making these tradeoffs, and I wouldn't recommend trying to tune it too much. You can make the latency better, but there will be a huge penalty to throughput and, worse, you can get into a state where some things just don't work. (For example, if you disable your paging file, two months from now you may find you're editing a large image or something and are simply unable to save it because the memory allocations always fail.)
Of course, you can always add more RAM. It's absurdly cheap right now. And that makes it less likely that Windows will have to make any tradeoffs in the first place.