an encumbrance is just the government freezing and reserving some of its funds for something it is going to purchase. you have the entries correct, but I think your logic and thinking is a little off.
say some government department needs a truck, and places a purchase order asking the general fund or whatever to buy it. the department doesn't know the exact price, but they basically are saying “we need you to order us a truck, it should be around $40,000.”
so the government reserves the funds by booking an encumbrance (using the first entry you mentioned).
DR: Encumbrance 40,000
CR: Reserve for encumbrance: 40,000
then the purchasing department or whatever goes looking for the truck that department needs, and finds one and buys it for $36,000. now you need to reverse the encumbrance, and buy the truck:
DR: Reserve for encumbrance: 40,000
CR: Encumbrance: 40,000 (this reverses the initial entry)
DR: Expenditure 36,000
CR: Cash or payable 36,000
from what I understood in becker, the entire purpose of encumbrances is to set aside money for purchases you are going to place. this is in case say on 12/29 that truck order was placed, when the budget is being made for the following year, they see the encumbrance of 40,000, so they know that 40,000 of your funds are already going to be set aside for a purchase that's about to take place.