I'm not really sure if it makes sense to talk about 'logic', but I'll still try to see if I can add some system to the madness.
Japanese often uses が, not を, after what would typically be the object in English, when there's no actual action inflicted upon said object. 彼が好き, お金が欲しい, 日本語が分かる, りんごが食べたい, 字が読める, あいつが憎い.
One way to look at it could be: if for example you want to eat an apple (but haven't done it yet), is it really you doing something to the apple, or is it the apple doing something to you? You might argue that it is the latter. This might be why what English speakers regard as the object can take on the more subject-like が.
In the Indo-european languages that I know of, the topic of a sentence seems to be the subject by default (I want money, I can read letters), but Japanese, having a separate topic marker は, doesn't really have this restriction. After having said 私は, there is more freedom to make different parts of the sentence into the subject (even if the topic is often implied in Japanese).
However, there are also ~たい cases where only を feels much more natural (maybe が is even wrong):
空を飛びたい <- (I) want to fly in the sky
家を出たい <- (I) want to exit the house
In these cases, (maybe depending on who you ask) 空 and 家 aren't real objects, but rather the place that a motion takes place through (the former) and the place that a motion takes place from (the latter). I wouldn't be able to back up any claim as to why を is more natural here, but maybe this way of using を entered into the language at a different point in time, and therefore different rules apply (Linguists, please come to my rescue).