Zeo wrote:
I don't really understand, but right, RGB channel is unchanged (in greyscale) and alpha channel is black.
Another, perhaps more intuitive, way to see this is to add layermask to your layer, and initialize it using the "
Transfer layer's alpha channel" option. You can then hide the layermask and see the original RGB image.
Zeo wrote:
(so maybe delete layer and make a new layer is better than clear a layer? Hmm... )

You can force the RGB channels of transparent pixels in a layer to black by adding a new transparent layer and merging it down.
It is debatable whether GIMP should be doing this automatically when you save to XCF. While your point about reducing file size is valid, there are some users out there who like to use GIMP to edit images where the alpha channel represents something other than transparency (for example, some game engines use the alpha channel as a depth map). To these users, fully saving the RGB channels is important -- indeed, they complain about the way GIMP removes the RGB info about transparent pixels when operations such as merging of layers is performed.
The GIMP developers' response to this conflict of interests is to basically do whatever they think is best, without committing to one way or another; the behavior of the RGB channels for fully transparent pixels in a layer is undefined. GIMP doesn't agree to support retaining the values, nor does it go out of its way to remove them.