Andrea's death was certainly not her own fault, but it was really dumb of her to answer the door for Todd.
First, it would be unsafe and against common sense for any woman to open her door to a strange man in the middle of the night. Add to that the gang ties her younger brother had and the criminal ties of her ex-boyfriend, and Andrea should've been looking over her shoulder at every turn. The people who murdered her brother were murdered in retaliation, making her a possible target of further retaliation. And she knows Jesse does something illegal for a living and makes incredible amounts of money at it, and that he's missing, which could put people close to him in danger.
Her amazing naivety was shown earlier when she not only spoke to Walt, but invited him into her house. He was clearly a crime buddy of Jesse's who could have wanted anything, and in fact was there up to no good.
Now if she'd been smarter about her own safety, would it have saved her life? Probably not. But it would've been better than walking straight into fatal danger.