You can easily take a taxi from Agadir or Essaouira to Imsouane or Taghazout. Share it with some people, it’s obviously cheaper. Hitchhiking is also common in Morocco.
City of Marrakesh
Marrakesh is well-connected by public transport. Take a train from Casablanca or a bus from major cities; Marrakesh Menara Airport