Why is SSH enabled by default on my PinePhone Pro?

Scanning my device with nmap I see that there is an SSH port open on it. What’s the purpose of this? Can I disable it?

It should only be enabled by default on the Dev images. Not the Beta/Factory image.

And yes, you can disable it if you want, just like you can on any Linux desktop.

I’ve recently switched to stable branch. However, ssh server is still active. Shouldn’t SSH be disabled after switching to stable branch? Or do I still need to disable sshd.service manually?

Nope. Switching branches does not change what services are enabled. Just what repo’s your mirrorlist points to.

Yep, still need to do it manually.
Run sudo systemctl disable --now sshd to disable SSH.