It is clear David was a king not a prophet, and was always whimpering about himself, so why would anyone quote it as prophecy when their goal is to get closer to God not make him angry?
After all prophets are only prophets if they are delivering instructions God sent then specifically to deliver.
Why would one do such a thing?
David never claimed to be a prophet.