According to the PHB (p. 15), you can choose your own starting items instead of taking those listed under class and background:
Instead of taking the gear given to you by your class and background, you can purchase your starting equipment. You have a number of gold pieces (gp) to spend based on your class, as shown in chapter 5. Extensive lists of equipment, with prices, also appear in that chapter. If you wish, you can also have one trinket at no cost (see the trinket table at the end of chapter 5).
However, this seems unreasonably expensive in comparison. Have I missed something? If not, why is this so expensive?
For example, a Scholar's Pack is listed as 40 gp (PHB, p. 151). The listed starting coinage to buy the items with is for e.g. a warlock listed as 4d4×10 (PHB, p. 143). This means that with about average luck when rolling for the starting gold, you can just afford a Scholar's Pack and that's it. No weapons, no armor. How come?