Most of the price in coffee is distribution. Even fair trade farmers make very little money. There are some distributors who work directly with farmers and if you buy green beans from them, the price is not very high. There are many places on the internet where you can buy them.
You can store green beans for a whole year, or even more, with no problems. After you roast the beans, the flavour develops for about 5-10 days and then gets worse. After 2-3 weeks, the coffee isn't very good. When you buy roasted beans, often it is already 2 weeks old before you get it.
Some people like 2 week old roasted coffee beans because it is less acid and many unfamiliar flavours have gone away. But once you get used to freshly roasted coffee, it's much, much better and it's hard to go back.
If you know a place that roasts its own beans, you can usually ask to buy something that was just roasted (maybe only 1 or 2 days ago), but often it is expensive. I usually buy coffee beans in Japan at a company called Tonya. They will roast the beans for you while you watch (they have a nice fluid bed roaster that can do small batches). It's also not very expensive.
But, if you don't have that kind of place, it's best to roast your own. There are many websites on the internet that will show you how to do it.
I like coffee, so I don't want the farmers who grow my coffee to starve.