Direct objects of motion verbs and help with the difference between を and に


> まちをぶらぶらあるく。  
>  English translation: Walk aimlessly through town.

I understand that aimlessly walk takes the object town and that’s why we use
を, but wouldn’t it make more sense to use に as the town is also the target of
the motion verb?

Also can someone please explain these two explanations on the differences
since they confused me and is there any resources/worksheets for constructing
Japanese sentences?

> CHAPTER 3. BASIC GRAMMAR  
>  3.8 PARTICLES USED WITH VERBS
>
> * * *
>
> Unlike the direct object we're familiar with in English, places can also be
> the direct object of motion verbs such as ｢歩く」 and 「走る」. Since the motion
> verb is done _to_ the location, the concept of direct object is the same in
> Japanese. However, as you can see by the next examples, it often translates
> to something different in English due to the slight difference of the
> concept of direct object.
>
> The 「に」 particle can specify a target of a verb. This is different from the
> 「を」 particle in which the verb does something _to_ the direct object. With
> the 「に」 particle, the verb does something _toward_ the word associated with
> the 「に」 particle. For example, the target of any motion verb is specified by
> the particle 「に」 particle.




I think it is better to think of this を as a location marker meaning
"through/across ～" rather than thinking of it as a direct object marker.
Simply, を has two distinct functions. Many verbs related to motion take を in
Japanese, and they are usually categorized as intransitive verbs in
dictionaries.

  * [この道をまっすぐ行ってください。 Why を and not で?](https://japanese.stackexchange.com/q/6869/5010)
  * [Making sense of transitive usage of 行く and 来る - 「を行く」 and 「を来る」](https://japanese.stackexchange.com/q/3243/5010)
  * [It seems that 渡る is categorized as 自動詞 (intransitive verb), yet it is frequently used with を. Why?](https://japanese.stackexchange.com/q/12734/5010)
  * [Why does 出る accepts を although it is an intransitive verb?](https://japanese.stackexchange.com/q/21313/5010)

