Why is my own general called an attacking piece?
These answers restate the rules implemented by our open-source engine, which follows the WXF laws and is regression-tested against the official 110-diagram repetition casebook. Where an answer refers to a specific position, that position lives on the linked reference page, where the build verifies it against the engine before publishing.
Direct answer
Because of the flying general rule. Your general denies the enemy general the entire file it stands on, for free and for as long as it stays there. In a bare endgame that is an extra attacker you did not have to bring, and several basic mates simply do not work without it.
The classic demonstration
A lone chariot mates a bare general — but only with your general's help, holding the file the enemy general would otherwise escape to. Move your general off that file and the identical position is just a check. It is the cleanest illustration of the rule's value.
When to bring it up
The moment the opponent's attacking pieces are gone. It is completely safe once nothing can reach it, it costs nothing to keep there, and it is frequently the difference between mating and drifting into a sixty-move draw.
Leaving the general at home in a won endgame is one of the most common conversion failures.
Related questions
Is it risky to advance the general?
Not once the opponent has no pieces that can attack it. Before then, yes.
Does this work in the middlegame?
Rarely — there are usually pieces on the file. It is fundamentally an endgame technique.