Here -다 is short for -다가, which can be used to connect two verbs.
As for "사다 주다", I think it is used frequently enough to be considered a fixed idiom. It means the same as "사주다".
Edit: Actually, I realized that they aren't exactly the same. "사주다" is "to buy for someone", but "사다(가) 주다" is "to buy, and then give it to someone". So, "사다 주다" would be natural when buying and giving happen separately. E.g.,:
(In a shop): 이 과자 사줄까? = Shall I buy this cookie for you?
(Going out for shopping): 과자 좀 사다 줄까? = Shall I buy (and bring home) some cookies for you?
Also, "사주다" can be used when buying itself is an act of favor, so for example a merchant can say "이것 좀 사주세요", which would mean "would you please buy this".