1.I once stole some apples at the market, but It was for my starving children, not for me.
It = "I once stole some apples at the market"
2.He said that he didn't want to live alone but had to reluctantly. It seemed to be for his family, not for himself.
It = "but had to reluctantly"
3.While his artwork was put up for auction for $19 million dollars merely because of his reputation, it looked too clumsy to be worthy of the price. It is why I tend to disregard artists.
It = "his artwork was put up for auction $19 million dollars merely because of his reputation"
Q1) Is it grammatically wrong to use "it" to refer back to a clause or sentence?
Q2) In each sentence, did I guess right that "it" refers back to the bold part?
Q3) Can I use "this, that, or which" in place of "it" in each sentence?
Q4) Even if it's not grammatically correct to use "it" to refer back to a clause or sentence, is it the one of the mistakes even native speakers often make?
I couldn't find out "it" can be used to refer to a clause or sentence in my dictionaries, though I'm not sure whether this use of "it" is listed in other dictionaries.