Why is accusative used with ein Pinguin
in the following sentence?
Man sollte immer einen Pinguin im Haus haben
Immer is an adverb, not a preposition.
Immer is simply an adverb and has no bearing as to case.
With immer, you're saying that one should always have a penguin in the house, without it, you're simply saying one should have a penguin in the house.
Akkusativ is used because haben is not a dative verb, and the penguin is the direct object, therefore it should be in the accusative case. The noun ein Pinguin is masculine, therefore it is declined as such:
Ich habe einen Pinguin
Du hast einen Pinguin
Er/sie/es hat einen Pinguin
etc.
The only difference is the addition of the modal verb sollen. Without it, you have this:
Man hat einen Pinguin
It does not depend on "immer" but on "sollte ... haben" (should have)
Man sollte einen Pinguin im Haus haben.
Man sollte {wen oder was?} im Haus haben.
"immer" is just a nice add-on:
without "immer":
Man sollte einen Pinguin im Haus haben.
You should have a penguin at home.
with "immer":
Man sollte immer einen Pinguin im Haus haben.
You always should have a penguin at home.