Use "so" when there is a result, or an effect due to an earlier cause, action or situation.
I was tired, so
I slept early. (tired - sleep early)
They came home early, so
they avoided the rain. (came home early - avoided rain)
We didn't want to get into trouble, so we parked in the lot
around the corner. (didn't want trouble - parked in the lot)
This sentence means the same if you write it this way:
We parked in the lot because we didn't want to get into trouble.