I finally figured it out:
My company has bought many HP switches over time of similar types (1700-8 (J9079A), 1800-8G (J9029A), 1810G-8GE (J9449A)) and installed them without changing the IP address and without changing the passwords.
When connecting to the IP of my switch at its default IP 192.168.2.10, the IP address was resolved to a MAC address via the ARP protocol. Depending on which of the switches answered first (or last?), the login was made to the wrong switch, thus the product type and the ports in use changed.
I didn't immediately notice this, except that I wondered why I have to login again. After changing the password, I found that I could not login any more and tried the default password - and it worked.
This made me wonder, so I lokked into the ARP cache. I saw that the MAC address for the default IP 192.168.2.10 changed often. It seems that the ARP cache has quite a short lifetime on Windows. In total I have identified 8 different switches.
IMHO leaving so many switches in default configuration without password is a security risk and I reported that to the IT department. What a pity that they have not detected this themselves.
In order to be able to configure my switch under the given circumstances, I first deleted the ARP cache with
arp -d 192.168.2.10
and then added a static ARP entry for my switch
arp -s 192.168.2.10 XX:XX:XX:XX:XX:XX
I could then connect to my switch and change its IP address to a different value, set the passwort etc.