BOOT0 vs BOOT1 circuit design in STM32f103 (ST-LINK)
Right below Figure 10 of AN2586 it mentions:


  Resistor values are given only as a typical example.


These pins can be tied directly to VDD or GND, but it is common practice to use resistors for a few reasons.


Series resistors can provide some current-limiting protection to the microcontroller pins.
Putting at least one resistor between the pin and VDD/GND allows for easier rework if the initial design assumptions/requirements change (e.g. oh no, we want to boot from system memory now instead of main FLASH memeory!).
Adding resistors to both VDD and GND -- and not populating one of them -- allows for switching between boot configurations with only a bill of materials (BOM) change instead of rerouting a PCB in order to achieve this.