Is it okay to shorten the sentence "Why did you give them a quarter?" to "Why give a quarter"?
Yes, it is very common to shorten sentences like this in English, especially in spoken English. It is common in English to omit subjects and auxiliary verbs like "did" and "was" from sentences. So the sentence "why give a quarter" is totally acceptable, it just sounds a bit more informal. Here's a few other examples where the auxiliary verbs or subjects are omitted in sentences: Ex: Why take one when you can have two? Ex: The air was cool and the water like ice.