Ooh, someone's being tricky! Okay, fine let's take a closer look (but if you're not interested in a technical digression, skip this bit!).
First, let's consider the original snippet:
We act as guardians rather than owners.
In this situation, we intuitively recognise 'guardians' and 'owners' as noun groups nested inside a larger prepositional phrase that begins with 'as', which effectively turns them both into adverbs—describing how or in what way we act.
We could rewrite it as:
We act as guardians rather than as owners.
That's why this particular 'scrambled' version still makes sense:
We act as guardians rather than legally.
Normally, an adverb such as 'legally' shouldn't be able to connect to a noun such as 'guardians'.
But in this sentence, 'as guardians' creates a prepositional/adverbial phrase, which let's us make sense of the connection to the adverb 'legally' (as in, "We act as guardians, which doesn't necessarily mean we act legally").