Kosher laws have nothing to do with getting into heaven. They're about community. Jews are the people who keep kosher. It's not a sin to fail to keep kosher. You're not jeopardizing the afterlife; Judaism puts far less focus on the afterlife than we're used to swimming in a Christian world view.
That does sometimes lead to a weird performative "more kosher than thou", which I don't believe is really healthy but every community has equivalent behavior. The finger wagging isn't about protecting their immortal soul, but merely making yourself to be the best at the arbitrary rules and therefore somehow to be most beloved by the community.
That is not really true of most Orthodox Jews. Keeping the laws is about following the word of God, and the afterlife does play a fairly big part in our worldview. There are a handful of laws which are identified in the literature as being about community but those tend to be ones added later by the early rabbis (miderabannan), rather than straight from the Torah i.e. God (mideoraisa).
That being said, what you described in your second paragraph does happen, yes. Though not everyone who engages in it has the motives you ascribe to them. Some are sincerely trying to do the will of God as best they can.
> It's not a sin to fail to keep kosher
Well, it is for a Jew, but not for a non-Jew. We don't say that non-Jews need to keep our laws, other than a few very very basic ones likes not to murder. Non-Jews can still have an afterlife without keeping kosher.
That does sometimes lead to a weird performative "more kosher than thou", which I don't believe is really healthy but every community has equivalent behavior. The finger wagging isn't about protecting their immortal soul, but merely making yourself to be the best at the arbitrary rules and therefore somehow to be most beloved by the community.