Hugely detailed NYT report on the subversion of the Iraqi oil industry and the insurgent management of its production. Apparently, the supply of crude oil from the northern fields is permitted to reach precisely the capacity of the Baiji refinery, as any more would be exported. Exports are valuable to the government, and stolen crude cannot be remarketed. Petrol from Baiji, though, can. Not just that, but even when the petrol reaches its intended seller, it's a negative asset to the government as it's subsidised. If it can be stolen, it can be sold at a better price on the black market - and if it is bought before reaching its goal, rather than stolen, it can still be sold at a profit.
Better, it can be exported - its value increases by a factor of 3.5 on crossing the Jordanian border, 4.5 on the Syrian border, and 9 on the Turkish border. As Iraq imports refined products and exports crude, the deal is even better for the smuggler-cum-insurgent. Because the fuel is not reaching the intended user, it's being denied to the economy and the black market price is being kept up. And, as Iraq imports petrol, every gallon the government buys outside Iraq is sold at a loss inside Iraq. It makes sense to export it and sell it to the government.
(Note that it's actually in the government's best interest, financially, not to fix the refineries.)
Update: A subtlety that escaped me. If the Iraqi government buys fuel in Iraq and resells it at a loss, it incurs a loss in local currency. If it has to buy fuel at market rates in, say, Syria and resell it at a loss, it incurs a loss in hard currency - exactly what the insurgent management of Baiji is denying it. And the rebels book the profit in hard currency, too.