1 Satan rose up against Israel and incited David to take a census of Israel. 2 So David said to Joab and the commanders of the troops, Go and count the Israelites from Beersheba to Dan. Then report back to me so that I may know how many there are.
3 But Joab replied, May the Lord multiply his troops a hundred times over. My lord the king, are they not all my lords subjects? Why does my lord want to do this? Why should he bring guilt on Israel?
4 The kings word, however, overruled Joab; so Joab left and went throughout Israel and then came back to Jerusalem. 5 Joab reported the number of the fighting men to David: In all Israel there were one million one hundred thousand men who could handle a sword, including four hundred and seventy thousand in Judah.
6 But Joab did not include Levi and Benjamin in the numbering, because the kings command was repulsive to him. 7 This command was also evil in the sight of God; so he punished Israel.
8 Then David said to God, I have sinned greatly by doing this. Now, I beg you, take away the guilt of your servant. I have done a very foolish thing.
9 The Lord said to Gad, Davids seer, 10 Go and tell David, This is what the Lord says: I am giving you three options. Choose one of them for me to carry out against you.
I find it VERY hard to believe that a person can 'sin' withOUT breaking a command of GOD.
The only thing I can say to this is that you are saying scripture is lying. See 1 Kings 15:5. Scripture does not lie.
James 4:17 Therefore, to one who knows the right thing to do and does not do it, to him it is sin.
In this case, the Bible shows that you don’t have to break a specific command of God for it to be a sin.