As far as I understand, signmessage just proves knowledge of the pubkey in a P2PKH. Once you send from an address the explicit pubkey becomes known. Ignoring "don't reuse addresses", am I correct in understanding that once you send from an address there's no point anymore in signmessage for that address?
There are many possible reasons for proving ownership of a pubkey or pubkeyhash (address):
- proving identity, for example here in Bitcointalk forum. If you "staked" your address here before and you account gets hacked, you can easily prove ownership of the account by signing a message proving ownership of the address in question.
- dispute resolution with a merchant: you spent all the UTXO associated with an address in a transaction to a merchant but there was an error, perhaps you weren't able to make a payment within the specified time frame, so even though your bitcoin was received by the merchant, you weren't credited because the time frame had expired. You open a dispute with the merchant and prove YOU sent bitcoin to the merchant"from" that address by signing a message.
That's from the top of my head, other users may have more creative reasons.
And if so, why does signmessage prove knowledge of the pubkey instead of the privkey?
I get the impression almost everyone believes it's there to prove privkey control.
Because you sign a message WITH the private key, and the message is checked AGAINST the public key.
If you can sign a message that verifies against a public key, it proves that you have control over that private key.
Addendum: bitcoin addresses are hashes of the public key, and the UI for verifying messages does not include the field to input the public key because it can be calculated from the message signed and the signature.