If you're asking about the sentences themselves, I don't think there's any particular reason why they used one form over the other. I think that they may have been just giving examples of how to structure either kind of sentence. It really depends on what you want to emphasize, as you mentioned before.
These sentences are both correct:
- I was working in a shoe shop for a year.
- I worked in a shoe shop for a year.
The emphasis is different, though. For example:
A: What were you doing before you headed off to college?
B: I was working in a shoe shop for a year.
The emphasis is on what you were in the process of doing during that specific interval of time (of one year), so you use the present continuous.
A: What work experience do you have?
B: I worked in a shoe shop for a year.
Now there is no time interval, so it is more natural to use the simple past, because the emphasis is more on the fact that you worked in the past, rather than the fact that you were in the process of working during a time interval.
Now notice that you can hold similar conversations with the second example.
A: What were you doing before you headed off to college?
B: I was living in Brazil for two years.
This sentence is a bit less natural. It would be better to say 'I was living in Brazil' without the time interval, because living in Brazil is more of a state of being than an action or a process of doing. You could say 'I was working in Brazil for two years' and it sounds more natural because it is emphasizing what you were doing during that two years.
A: Where have you lived?
B: I lived in Brazil for two years.
This sounds natural.