It's an occasional practice for users to post two or more answers to the same question. It may be done for several reasons:
- To split specific use-cases into separate posts, which may require specific approach.
- To decrease noise/distraction in the original/first answer. Lengthy answers may get tedious to read for users. Shorter posts may win in clarity
- To outline multiple steps required for the solution, and provide detailed overview of what should be done
The specific example you address can fall under the first bullet point, but not under the other two, so in that specific case I agree - the posts should be merged. That said, I still think multiple posts are OK
I personally have often gotten comments suggesting that alternative approach that I crammed into same post should be split into two.
Of course, it is possible to have users who spam posts, but that tends to occur only in low-reputation users. The higher reputation users typically have a specific reason for doing what they do.
The way I see it is this: if a post addresses the question(on-topic), is detailed ( not low quality ) , and not spam - then let it be. It doesn't matter who posted it - the same user or several others - as long as it's useful