Makes sense. People respect the authority of the law/government to varying degrees. Of course their opinion is swayed when the government officially sanctions something. People don't have strong, let alone informed opinions about tons of things so legality is a signaling mechanism for good/bad.
I agree. Many people (perhaps those without religion or some other mechanism that provides an external moral code) just adapt the law as their moral code: if it's legal, it's moral; if it's illegal, it's immoral.
Of course, this fact is always obfuscated when talking about drug legalization because it is harmful to the legalization effort to suggest that legalizing a drug will lead to increased usage/acceptance of said drug (usually the opposite claim is made - that legalizing the drug will reduce usage)