It's because your statement does not produce output.
Besides all the warnings of Darin and lazy (they are right); the question still offerst something to learn.
If you want to execute methods that don't directly produce output, you do:
@{ Response.Redirect("~/Account/LogIn?returnUrl=Products");}
This is also true for rendering partials like:
@{ Html.RenderPartial("_MyPartial"); }
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…