
The advantage is freshness, not only with grinding just before brewing but also with roasting just before grinding and brewing.
Coffee will not be bitter if it is freshly roasted, ground, and brewed. A bitter tasting coffee is indicative of coffee that has been roasted and then sitting and becoming stale and oxidizing. This decomposing process is occurring whether or not the coffee is in vacuum sealed bag. The one way valve on that vacuum sealed bag is allowing gases (CO2 is one but there are many others) to escape and be forever lost. Those gases contain aromas, flavors, and beneficial chemicals (that assist with clarity of thought) which start leaving the porous coffee bean immediately after roasting.
To prevent this degradation of the coffee from happening, you need to buy green coffee and roast, grind, and brew yourself. You will be amazed how much better and fresher the coffee is and the bitterness will be gone! Its not that the bitterness is created later, but what happens is the other aromas and flavors are still present and they balance out the bitterness so that it seems like the bitterness has disappeared. If you let that same coffee sit, unused, the bitterness will be exposed by the loss and absence of the other flavors.
Try it! You will be amazed at the difference!
More on Quora



