The following analysis is a paraphrase of the discussion in "Japanese: A linguistic introduction", Hasegawa, 2015
One can consider three classes of predicates when it comes to transitivity. One class is verbs that come in clear transitive / intransitive pairs:
midori opened the door.
the door opened.
in these pairs, the patient (the noun that something happens to) is marked by を with the transitive verb, (it is marked as the object of the sentence), and が with the intransitive verb, (it is marked as the subject of the sentence). This is the vast majority of Japanese verbs. Note that even if the が marked NP is omitted from a sentence containing a transitive verb it is still understood to be there.
ビールを飲んだ。 X drank the beer. / NOT: the beer was drunk.
There is also a small class of verbs that, like most english verbs, can be used transitively or intransitively:
midori opened the door.
the door opened.
(note this verb is not aku /akeru, but hiraku and is in the same form in both the above sentences)
The third situation (the one that 分かる) falls under, is the situation of low transitivity. This is the situation in which the patient is not really affected by the action (the analysis is more complicated than that, they list 10 things that affect transitivity, but thats the main thing).
So the answer to your question is that different Japanese linguists have analyzed the situations differently.
One camp says that が absolutely marks the subject of any sentence so a sentence like:
日本語が分かる。 = Japanese (subject) is understandable.
This analysis is compelling because it keeps the particle usage consistent (が marks subject). But that would mean that 分かる would behave like an intransitive verb (not taking an object in its normal usage). But the problem with this is as you have noted, there are times that 分かる does take を, and additionally, most people's perception is that "to understand" is a transitive action, i.e. There is an "agent" "understanding" something.
Others (most notably Kuno "The structure of the Japanese Language", 1973) have argued that in "日本語が分かる", が marks the direct object. He goes on to argue that a certain class of predicates (sensory perception, want-to-do verbs, can-do-verbs) can mark their object with が instead of を. This interpretation analyzes 分かる as a transitive verb, but one that has a non-standard particle usage (marking it's object with が). The advantage of this analysis is that it maintains our perception of the transitivity of "to understand", it also accounts for the ability of the verb to mark it's object in the "normal" way in addition to が.
Both analyses have their advantages and disadvantages.
Hasegawa argues that the core issue is the perceived (by the speaker) transitivity of these verbs. The lower the transitivity, the more likely their "object" (in the Kuno analysis) is to be marked by が.
As an example she offers the following:
わたしは ビール が/を 飲みたい。
I want to drink beer.
わたしは 部長 が/を 殺したい。
I want to kill (my) section chief.
She says that most native speakers would prefer が in the first case, but in the case of a very highly transitive verb (to kill), the preference for を marking increases and that most native speakers would prefer を in the second sentence.
It is important to note though that what is going on here is that there are some verbs (sensory perception, want to, can do, to say, to meet) that don't fit neatly into the transitive/intransitive framework. All these verbs share the characteristic of being "low transitivity".
What is absolutely not true, though, is the notion that transitivity is not a semantic feature of Japanese. The transitive / intransitive distinction is taught in 国語文法 (the school grammar that Japanese kids are taught). Additionally, Old Japanese is analyzed as having transitivity (and transitivity reversing) morphemes as part of the verb structure (that is why the transitive/intransitive pairs follow patterns). And those transitivity distinctions have been traced through the language to middle japanese, then late, then modern, to arrive at the currently used verb forms.
Japanese kids are taught about transitivity using the same trick that they teach english speaking kids. "can you ask the question 何を?".
Even with pro-drop, if some one says:
you can ask:
not stating objects doesn't change the valence of the verb. It is still understood to have an object (i.e. you can ask about it).
By the same token the sentence:
would be rejected by native speakers as being ungrammatical.