/panetteria/ is obviously from /pane/.
/pasticceria/ is from /pasticcio/, and from /pasticcino/, where
/pasticcio/ has two meanings (one meaning is : complex food preparation),
and /pasticcino/ is just the kind of sweet /pasticcio/ (Eng.: pastry).
Don't confuse with /pasticcione/,it has a completely different meaning!