Do I have to lower the foot and needle when my sewing machine is not in use?
This is akin to the advice, &quot;Don't run with scissors&quot;.  As rebusB points out, it isn't a necessity for the machine to work.  It's because undesirable things could potentially happen, which can be easily avoided.
The undesirable things aren't limited to accidental damage when moving the machine.  The machine could be bumped or experience mechanical shock from things that happen when you are not intentionally moving it.  When the needle is all the way down, not just the needle, but the internal mechanism, is the most protected.
It also protects the user and their fabric from accidental damage.  People tend to focus on the specific thing they're doing and have minimal awareness of the surrounding environment.  If they aren't paying attention, they could accidentally snag the fabric or potentially stick themselves on an exposed needle.  If the needle is left covered inside the machine, the user has to explicitly move it into position to start sewing, which makes the state of the machine something they are focused on.
The odds of any of the possible undesirable things happening are low, and the results aren't catastrophic.  Still, they can easily be avoided by doing something that takes no real time or effort, so why not use the safest practices.