Tarkovsky was making the movies he wanted, and stories were just pretext.

Both Lem (Solaris) and Strugatsky Brothers (Roadside Picnic turned into Stalker) disliked what Tarkovsky did.