The vocabulary applied to today's cars draws a lot from the vocabulary applicable to horse-powered vehicles. See for instance "Limousine", "Berline" in French and other languages or "Cruscotto" in Italian.
In the case of the English "boot", the origin is that in the 18th and 19th centuries, the coachman used to sit on a locker where he could store, among other things, his boots. For this reason, this was termed the "boot locker" and after a while an additional compartment situated at the rear of the coach was used, also called for the same reason the "boot" (for short).
Boots of course were mandatory in those times given the state of the roads. Jane Austen alludes in several of her novels to the fact that speaking about the state of the roads was as common place in England as speaking about the weather. For one thing, the roads have improved since Jane Austen ;-). As for the weather...
As for the American "trunk", well it should suffice to look at all the classic cars designed in the post WWI era, for which trunks were mounted at the rear end.
In this affluent era, cars from manufacturers like Duisenberg, Cord, Buick, Lincoln were all competing for high end customers and these trunks featured many compartments for plates, whiskey flasks and all the paraphernalia needed to go for a picnic.
Some cars (mainly coupés, or "roadsters") had special compartments for golf clubs.
In France a similar process lead to people saying "La malle arrière" (as in Louis Vuitton's piece of luggage) and now "le coffre" (the trunk), or in Spanish "el Baul" which is a large piece of luggage as well (and now a more simple "la maleta"). Same for Italian "La baule" which is both the boot or a chest (la baule da marinaio).
The fact that a trunk is a word for a large wooden chest suggests that some of them were carved out from tree-trunks as it is still sometimes found to be the case in some Asian countries were these items, lavishly decorated, are regarded as luxury items (and priced accordingly).
Further back in time "trunk" comes from Latin truncus, or "cut off" → truncated, as the trunk does to the end of a car.
Best Answer
The Phrase Finder explores three different possible origins in the following extract:
Grass up:
First assumption:
Second assumption:
Third assumption:
The second and third hypotheses are supported also by the Word Detective: