Yes, as pointed out dispatch puts in your fuel order. Now when they do so you have the numbers on your release- taxi, burn off, holding fuel, reserve, alternate fuel (if required), and perhaps extra fuel if the dispatcher is on the ball and sees something that warrants it.
Most carriers give the PIC discretion to add a marginal amount without discussing it with the dispatcher. This is especially the case of pax or bags are going to be bumped. It's not to say you don't bump them for gas when safety is involved. Happens on a regular basis. At the same time, however, you don't bump them for a "warm and fuzzy". If pilot wants a warm and fuzzy he should get a stuffed bear.
Also understand that extra fuel above what is required=weight. It costs gas to carry that weight so you could say it costs gas to carry gas. On one flight you are not talking about much but add it up over a fleet doing thousands of flights a day and it adds up.
This sometimes leads to airplanes diverting and it is understood that this will happen. The cost of an occasional divert is still less that airplanes flying around with excess gas.
Finally, crews have a part in this. In addition to looking at the dispatch and agreeing with it they need to fly the plan or at least keep a close eye on the gas. Airlines for the most part have moved to smart cost index flying or smart CI. Usually this will have you fly slow to conserve gas, but sometimes it will have you fly fast to make up time. If the ACARS tells you to fly faster than the planned CI number, on the release or if you decide on your own to just fly fast, you need to keep an eye on the burn rate and fuel on board. There have been cases of crews having to divert or even worse landing on fumes as they did not track this.