In Android Marshmallow you have to alter the settings when you decide whether you want the SdCard to be used for Internal or Portable Storage.
Choose Internal if you want to install Apps on it but if you remove it at any time, they won't work - possibly not even when you put it back in.
Even after doing that, there will always be some Apps that won't work without being installed into the system storage.