Perhaps it's just that Iran believes it's only chance for victory is maximum public attention, and they don't have any real hacker know-how. So they pick a soft but well known target.
I suppose the idea was that Canonical is a UK-based company and they're being threatened by the US's enemy.
Having said that, I really can't believe that either Trump or Starmer will give a shit about this, especially given the recent friction in that relationship.
It's what they do to students inside Iran.