The movie industry has been doing things like this since the Hays Code was done away with.
I remember the Beetlejuice movie(1988), PG rating. Just over half way through they quickly throw in the F bomb.
I know what you mean. I’m surprised the first two “Indiana Jones” movies are only rated PG!