Because here the word "good" is not meant to apply, at least directly, to "career". It applies instead to "it" (i.e. "zeh"), whatever that is. The word "career" in Hebrew is feminine so any adjectives that apply to it, for instance "good", must be in the feminine form too.
They are different because the word "good" is attached to different words. In the sentence יש לו קריירה טובה, "good" is feminine, because it stands with "career" which is feminine, so it also needs to be feminine - קריירה טובה.
In this sentence זה טוב לקריירה שלי, the word "good" stands with "it" which is masculine, so it also needs to be masculine - זה טוב.
If by any chance this sentence read: "This is for my good career", then "good" would also need to be feminine, because it stands, again, next to "career", which is feminine - זה לקריירה הטובה שלי.
So, "good", or any adjective changes gender and number, depending on which noun or pronoun it qualifies.