There is no reason nor is there a rule. It's all context based.
If BK is talking about whoppers and they say "2 for 5" you can deduce two whoppers for five dollars. That's because it is the reasonable idea. It is not two dollars for five whoppers... that's too cheap to make any sense.
If they were talking about individual chicken nuggets and they said "2 for 5" you would deduce two dollars for five nuggets. That price would be reasonable, whereas 5 dollars for only two little chicken nuggets is not.
People will understand the phrase automatically in a way that makes sense.