The adjective dainty developed from a Middle English noun that could name esteem, delight, luxury or a choice morsel. That noun came through French from Latin dignitas.
The Middle English noun also had esteem and delight senses. The food context selects its choice-morsel sense so that it can be distinguished from the older Latin standing or esteem sense.
Source
Merriam-Webster: daintyMiddle English deinte or dainte included high esteem or honor and produced the adjective behind dainty.