I read through parts of Khovanov/Rozansky's paper on the categorification of the HOMFLY polynomial using Matrix Factorizations. Technically, I can follow (though it seems to me that quite a lot of details are missing and tedious to fill in) - intuitively, however, I have no idea why one is lead to consider matrix factorizations when studying knot theory, in particular the RT invariants obtained from interpreting colored tangles as morphisms between modules over the quantum group. Until now, it feels quite mysterious to me why Khovanov and Rozansky choose particular potentials like $x_1^n+x_2^n-x_3^n-x_4^n$ in their construction, and why one should expect that in the end we get something invariant under the Reidemeister moves.
Can somebody explain to me the motivation behind this construction? What is the relation between the morphism of modules over the quantum group a wide edge represents and the matrix factorization associated to it?