HSK6 Standard Course: Does the sentence 她的脾气不好，经常不知道为什么突然就生气了 violate the textbook's own grammar rule regarding inconsistent subjects?
她的脾气不好， (她)经常不知道为什么突然就生气了

The above are two independent sentences in a comment
sentence 1: [她的脾气]不好 (她的脾气 is the subject)
sentence 2: [她]经常不知道为什么突然就生气了 (她 is the omitted subject)
The subject 她 in sentence 2 is omitted because both sentences are the comment of an implied topic '她' (both sentences describe '她')
topic: 她 (implied)
comment 1: 她的脾气不好
comment 2: (她)经常不知道为什么突然就生气了 - 她 is omitted because it is the same subject in the implied topic 她
To unite the two sentences, we can make '她' the only subject

她脾气不好，经常不知道为什么突然就生气了

'她' is the subject of both 脾气不好 and 经常不知道为什么突然就生气了 therefore no need to repeat it
Edit:
她脾气不好 and 她经常不知道为什么突然就生气了 are closely related in logic, therefore, we can presume they are comments on the same topic/subject.
If the two comments are not closely related, we might not be allowed to omit the subject 她 in the second sentence, even both sentences are comments on the implied topic 她
Example:
她的兒子今年三歲，她在中學教書
If you omit 她 in the second sentence and wrote &quot;她的兒子今年三歲，在中學教書&quot; It would mean her three years old son is teaching at middle school