The reason that return statements aren't allowed in finally blocks ultimately comes down to the point/ goal of those structures.
Finally blocks are special blocks of code intended to always run start to finish, after some previous control structure has finished executing; they're primarily for "cleanup"-type code.
If we take the code provided:
Try
HugeOp()
Return "OK"
Catch
Return "NOK"
Finally
Return "Finally"
End Try
The Finally block will be executed after the Return from either the Try or Catch.
This does kind of mean that having a Return there would "always return the same thing", but it's more than that– a Return already happened in the current procedure! What should that instruction even mean? Where are we returning to?
In the general case, a Return makes no sense within a Finally because having a statement that transfers control outside of these blocks is 1) antithetical to their purpose, and 2) hard to even conceptualize, since Finally blocks break the "standard" control flow when they run since they come after the Return of some previous control structure.
In C#, gotos are disallowed in finally blocks for essentially the same reason: external control transfer is just off limits within finally by design.
JavaScript can serve as an example here of how confusing things could be without this rule: in JS, finally blocks execute immediately before a control-flow statement (e.g. return) in try/ catch, but do allow returns inside themselves– which will overshadow (override) the return inside the try/ catch, if it exists.
I'd argue there's no resolution to this problem that's not confusing, other than just outright disallowing it.
function m() { try { return 1; } finally { return 2; } }a call tom()will return 2. Implementing that was a real pain for the development team. It's also legal in Java.