I do both. Many times I have bought for a project but, because life gets in the way, I'm not able to start my project. I've built up quite a stash. At other times, I will be in the store and see some fabric that just calls out to me and if it does, I usually buy about 3 yards.
What I discovered is that what I buy can be mixed and match very easily. I seem to go for a certain intensity in color. I made my URR blocks all from my stash and I loved the way the different colors would blend and work together. That has given me confidence to buy more fabric, even if I don't have a project planned for it at that time.