I haven't encountered this before, but the fact that it does work when you put the redirect outside the Directory directive scope seems to point out that Apache is not matching that Directory directive when it receives
/test as a request. The docs say that Directory should match when the request points to the specified directory or some subdirectory therein - but Apache is probably first checking whether
test is a valid subdirectory, and not finding it it doesn't look inside that block.
I'm not seeing why leaving the redirect outside the block doesn't do what you want - isn't
/home/site/www the document root? If you do need to limit this redirection to some part of your site use
Location instead of
Directory - it handles URLs independently of the physical path in your server, which is probably what you need considering that
test doesn't really exist in your server.
If in need of a more complex redirection (for example if you want to redirect all URLs starting with
/test, and not only the requests pointing exactly to
/test) consider using RedirectMatch instead:
RedirectMatch ^/test.* http://www.google.com
Redirect would redirect
/test/example to http://www.google.com/example instead of to plain http://www.google.com, which may or may not be what you intended. This
RedirectMatch discards whatever comes after