Would the meaning be the same if I replace "which is good" with "that is good"? Why "which" was used here?
No, it would not be the same if you replaced "which" with "that" in this case. This is because "is good" is a new clause and it is nonrestrictive. "Which is good" introduces new information into the sentence which is not essential. Whenever you are introducing new information after a clause and it is irrelevant to the main point of the sentence, you can use "which". Ex: They gave us some fresh fruit, which was very nice of them. Ex: It only cost a dollar which was very cheap.