Sin doesn't remain alone. It hatches more. When David found that Uriah would not go home he hatched another plan to murder her husband through the hands of his enemies. David says he sinned against God alone and did what was evil in God's sight. We might say he sinned against people, against Bathsheba and Uriah. But David recognized against whom his true sin was. Consider that when you sin against another the greater part of your sin is against God. You might hide your sin from people little realizing God was present all the while.