"I go there thrice a week."
Translation:אני הולך לשם שלוש פעמים בשבוע.
Is ל optional when you are referring to where you are going? Like אני הולך שם for example? How do you know when to use ב or ל for שבוע? Why can't we say לשבוע? Is there an exception to rules?
No, ל is absolutely necessary when referring to a destination. אני טס לקוריאה - I am flying to Korea. אני הולך לבנק - I am going to the bank. אני הולך לשם - I am going there. Theoretically, I guess you could say שלוש פעמים לשבוע, although no one would say that and it sounds awkward. The ל means per, as in three times per week.