There has been a lot of speculation about Hadrian's wall and what purpose it served but the truth is, we don't know. As you say, it was not a particularly imposing defensive structure. Too long by far to be effectively held against a determined attack. There are several possible theories on why it was built:
It may well have been a combination of all three reasons, or neither. As I said at first, we don't know. The roman border in Germany was built around the same time and lacks a continuous wall, relying instead on some ~60 proper forts and hundreds and hundreds of guard towers.
What I can tell you from a military point of view is that, as we understand the military of that era, it makes no sense to build a 73-mile wall. Given the troops available and the area around it would have made far more military sense to defend/control the area with a few more powerful forts and patrols.