Desktop and Documents folder invisible in finder, but visible with ls command

This is normal behavior if you have activated Desktop & Documents Folders syncing in iCloud (as @pjc90 has mentioned in the comments).

enter image description here