You could look at it this way... and look, bear with me. Im not trying to be harsh, its just the world is changing and often society tells us weddings and invites have to be done a certain way and any other way is 'rude' even if the person making the 'error' isn't intending to actively insult you, just prefers to go about things differently to what 'should happen' as dictated by social rules they might not personally subscribe to. So this is just a bit of... thinking out loud, I guess.
And of course if there's masses of backstory where you actually both have fantastic close personal individual relationships with the groom then obviously its a bit different! But not much.
Would you really want to attend the wedding ceremony of someone whose invited you and your son out of obligation because its the expected thing to do?
As opposed to because they have such a relationship with you both individually on a personal level that they want you there witness the actual vows. Which would be ideal but seems isnt the case here. Which is actually understandable, given that no relationship between two people is ever the same as the next one, so sometimes you can care for someone a great deal but in a different way you care for the next person.
Are you upset because you and your son have good personal relationships with BIL to the extent that you would choose to be in each other's life even if you weren't by marriage?
Or are you upset because you believe that the social rules that have sprung up around marriage over the years mean that your understanding is that you should be invited, regardless of you and your sons individual relationship to the person involved, because you are married to his brother?
When i go to work, I might have to work with someone whose perfectly pleasant, but I would never choose to spend time with them otherwise for whatever reason. That's kind of what happens when new partners enter the family. They might be perfectly pleasant, and you can rub along just fine, but they might not ultimately be someone whose company you'd seek out otherwise. You obviously want to be polite to them, and make them feel welcome, and be friendly, because that is the nice thing to do, and whats the alternative, snub them? Be mean? But then when it comes to situations like this, you are expected to treat them and indeed, any blood related family members who you just wouldnt really socialise with otherwise, as your nearest and dearest, people whose company you take a great deal of joy in, people with whom you have a well developed personal relationship that exists outside of 'family'. You dont mean them no harm, nor do you wish to be rude, you just dont consider the relationship that close. Spending a lot of time together, as with the coworker example, doesn't necessarily equate to a close personal relationship. Going one step further, sometimes for whatever reason we dont like people, but can be perfectly friendly and polite towards them because you want things to be harmonious for your sibling etc - but ultimately, you dont want someone you dont like there when you say your vows. Not saying this is the case here.
Just something to think over, I guess. If you do feel like you and your son each have a close personal relationship with your BIL outside of this, then I understand why you would be hurt.
But I wouldnt want to be invited to the ceremony of someone because they thought they SHOULD invite me, as opposed to them wanting me there. And sometimes the not inviting has nothing to do with your relationship with them, and simply just other dynamics at play - they are close to others and want to keep it small etc.
I know this is a bit of an unusual viewpoint so please dont think I mean any offence, its just im in my 30s and I know quite a few people who think the above and would be puzzled by the idea that they would be perceived to have slighted someone by not following 'rules' that have been made up over the years to... well, to be blunt, guarantee people an invite to a wedding regardless of if the persons getting married want them there or not.
Again, unusual viewpoint I know, and I understand you are hurt, but take some time and take a step back and think about whats hurting - did you think you and your sons individual relationships with BIL was very close and driven by genuine love for each other's company, and this has maybe made you realise he probably likes you well enough but wouldnt have you in his life if he didnt have to? As I understand why that would sting.