Why and when did this practice of serving bread in a basket (as opposed to, say a plate) come about?
"Basket" is meant to imply "freshly-baked".
When freshly-baked bread is taken out of the oven, it needs to be placed on something ventilated to cool, to avoid becoming soggy from the moisture escaping from the hot bread condensing (as it would, trapped between bread and a plate or tabletop).
Today, metal grills (cooling racks) are common, but baskets were a traditional solution:
https://i.pinimg.com/564x/15/da/ba/15daba095951c1af355f61496809e3a4.jpg
https://commons.wikimedia.org/wiki/File:7-alimenti,_pane,_Taccuino_Sanitatis,_Casanatense_4182.jpg
https://i.pinimg.com/564x/de/d1/c2/ded1c26ffa777d70ee09d2ce17bf3d31.jpg
Two things can be seen in this last painting: (a) the basket is leaning against a support so that air can flow under it, and (b) an alternative to baskets is also shown - bread with holes (in this case, pretzels) can be hung on hooks or poles.
Of course, many things were carried and sold in baskets:
since they could be easily made in a variety of sizes, with built-in handles, and could protect their contents better than bags/sacks, and were lighter and cheaper than barrels (barrels are usefully much more waterproof than baskets!). Even today, the ventilation provided by baskets can be useful for things other than bread - fruit can keep better in baskets than in solid-sided bowls.
While "basket" doesn't mean that the bread is actually freshly-baked, bread in a basket is more likely to be freshly-baked than bread on a plate.
One could ask "Why bread?". Bread is the traditional staple over much of Europe, and a meal without bread would not be a proper meal. Thus, at a fancy three-course dinner, a token bread role appears on a plate to make the meal a proper meal. (Similarly, many Chinese feasts are ended with a small bowl of rice. Without the rice, it would just be a snack rather than a proper mean. Also, this gives the guest the opportunity to leave some of the rice in the bowl to show that they had enough to eat during the feast.)
Bread baskets are much older than the above Medieval and post-Medieval examples, but this is the time when relatively plentiful art of bread baskets becomes available. Baskets with bread were found in Tutankhamun's tomb, but both bread and baskets are much older (both pre-date the Neolithic and farming, but I don't know of any really old evidence for bread in baskets.)