Wa(ha) は and ga が particle usage
The particles は and が commonly appear in the Japanese sentences. Both mark a subject. To untrained ears of the students of Japanese language, it may not alarm them even if the use of particles are swapped in the sentences.
Although many Japanese may not be able to explain precisely, we are guessing, the reasons or conditions of appropriate use of these particles,
their ears have no problem of catching the oddity of sentences. They are distinguished and precisely used in Japanese sentences.
There is a well written book, we like to introduce, on the subject of Japanese sentence connection including は and が particle usages. We'll quote about these particle usage from the Basic Communication by Kakuko Shouji, leaving details to her book.
"The particles は [wa] and が[ga] are perhaps the most troublesome and confusing particles for students to learn. Some students think both は [wa] and が [ga] are subject markers and are interchangeable. In fact, though, は[wa] marks the sentence's topic or focus, which may be different from the subject of the verb.
However, when the topic is the same as the verb's subject or object, [wa] may replace the subject marker [ga] or the object marker を[o].
The author gives the following examples."
I (am the one who) bought the book.
(As for me,) I bought the book.
(As for me,) I bought the book (NOT other book).
(As for that book,) I bought it.
" ... One of the function of は [wa] and が [ga] is similar to that of the English articles "a" and "the," Like the indefinite article "a," が[ga} introduces a new subject in the story ... The topic marker は[wa], on the other hand, works like the definite article "the ,". The topic marker は [wa] replaces が[ga] when the subject has already been introduced ..."
If you like to pursue this subject, suggest to read the following book.
This book explains how words and phrases dovetail, how clauses pair up with other clauses, how Japanese sentences come together to create harmonious paragraphs. The author is a longtime instructor at the University of Hawaii.