Proper textbook grammar would be something like
毎朝犬の運動のために公園を散歩する
But it's possible to omit things in spoken language, where grammar rules become much looser. I don't know if that's what the sentence is going for, or if it's just someone who made a grammar mistake. This sentence comes from Tatoeba (as you can see on the side link for the sentence) and anyone (you, me, natives, non-natives, people who have no idea what they're talking about) can submit sentences there if they want.
Thank you! that helped a lot!
I asked a native speaker, this wasn't my opinion.
I'm curious why you'd say that のために doesn't sound right, since whether or not the first sentence is okay, that sentence is absolutely okay.
Unless I am wrong, this is perfectly correct. One usage of 〜に is to indicate what things are done/used as. For example,
誕生日のプレゼントに本をあげました
= I gave a book as a birthday present.
Note that 〜のために doesn't quite sound right here.
In this case, the activity of taking a walk in the park is used as the dog's exercise every morning.
I got the chance to ask a second native (both are Japanese teachers of English, so they don't teach Japanese, but they do have a firm grasp of Japanese, presumably). The second also agreed that the first sentence sounds strange, and the のために sentence sounds grammatical.
The に before the 公園
Can anyone tell me what the に before the 公園 is there for? Is it somehow saying "at" the park? is it somehow a suffix for 運動? If so how does it work, what kind of suffix is it? Any help would be appreciated.