Language in Posts and editing profanities generally
For this section, let's assume that profanity was not forbidden
Stack Exchange is a site for users starting at the age of 13 (16 in EU). It's also intended to serve as a place for professionals to gather and create awesome answers that help future visitors.
For that reason, the policy explicitly states to prefer professional language and avoid any profanities. Users are encouraged to improve posts by editing them. That includes removing words (or even whole sentences) that do not add to the post.
There is established precedent for editing out profanity (and profanity-replacements) as not contributing to the actual content of a post.
Editing Profanities in Code
Some sites (like Code Review) have put specific editing rules in place to avoid problems stemming from "overzealous" editing. That is why we disallow edits to the code.
While we disallow edits to code in the general case, I'd say network policy trumps site-policy in cases like this.
On that note: It's not really necessary to go out of your way to clean things like that up. That can raise some eyebrows
The specific case
In this specific case the moderator team was made aware of the question through a flag as "Rude / Abusive". Flags of that kind are high priority.
In this case I saw no need to delete and lock the post, applying a 100-rep penalty for the asker for something that could be fixed with a simple edit.
If users (justifiably) take offense to the language in a post, either the language gets removed, or the post gets removed. In this case removing the two offending words was significantly less problematic.
In closing I want to lose a few words about what R/A flags do, what they're intended for and which problem they solve.
The intention of the rude / abusive flag
R/A flags do the following things:
- Apply an automatic downvote
- Are handled as high-priority moderator flags in the moderator queues
- If the flag is validated - either by coming with 5 other flags or by a mod -, the post is deleted with a full-blown censoring. Even 10k Users do not initially see the original post.
- If the flag is validated, the author of the post is given a 100 rep penalty.
Seeing this we can conclude that these flags are intended to utterly destroy things like:
- Targeted abuse
- Raw Evil
- Cthulu
These flags are not the tool to be used for some "mildly over the line" formulations that can be fixed by simply editing the question.
More explicit guidance can be found in the network meta faq