I'm retired military, and I can honestly say I never heard as much profanity in my entire career as you hear on one episode of the Sopranos, so it's a modern phenomenon.
I recall reading an article many years ago in Argosy magazine. The author's father heard him say a curse word in public, so he made the author sit down and make a list of every curse word he knew. Then the father added a bunch that the kid didn't know. He encouraged the kid to use them whenever possible, and told him it made him sound so intelligent and grown up. The point was made.
In my personal case, my father would have washed my mouth out with soap if I resorted to profanity around him. He was a highschool educated farmer and carpenter, not a deacon in the church. He wasn't even religious, and neither am I, but he felt there were enough words to describe a situation without going into the gutter to find them.
I won't tell anyone what words they should use in any situation, but if you use them in the presence of my wife or daughter, expect to be called on it. If I scan the pages of a book and see nothing but garbage language, I put it back on the rack. That's just a personal opinion, and I'm sure it's not a common one, but just because you heard one soldier swear, don't assume that they all do it, or that it's necessary to fill your book with the f-word before people will read it.
My novel has some mild cursing in it, but it reflects the level my generation used, nothing like what you hear today. As someone who writes things for others to read, I believe I have a small degree of responsibility to help raise the level of civility in our society, and I try to do it.