Other possible scenarios. Your offer was FHA. sounds like you wanted the bank to pay your closing cost as well as assisting with a downpayment of 3%. Therefore if you looked at a $100,000 property on just loan closing cost a lone, The bank's net is $95,000 or Less. Since the bank is attempting to net the most, your offer might net have given the bank the best return.
FHA loans require certain property conditions to be in a certain type of "safety condition", and the bank may have determined it was not in their best interest to accept an FHA offer if they felt it would not come back as an all clear regarding property condition. If it came back with property conditions, then the bank would have to correct those items and they may not want to do that because it cost more.
If a bank does counter more than one offer, typically they will tell the listing agent to convey to all the buyers and their agent that the buyer need to present their "highest and best" and the bank will then give a time limit as to when the highest and best offer need to be in to the bank.
Regarding the double dipping question, Banks will pay a total commission fee whether it is one agent or two agent involved and is not considered double dipping, Though in fairness to answering your question. You haven't provided enough information to give you a satisfactory answer. Right now it doesn't sound like it would be beneficial to hire an attorney. If you do need real estate attorneys to talk with. Let me know I can provide you with some.