Richard Feynman said this quote

Science is like sex: sometimes something useful comes out, but that is not the reason we are doing it.