I know it's forbidden in its charter. But what is the economic rationale?
There is no direct economic rationale for this. This is done because there is a worry that if Fed will directly deal with government it will undermine its independence.
When it comes to the independence itself most economists would argue that independent central banks perform their duties better than ones that are not independent (the same way how for example independent courts usually rule more fairly than ones that are not). This is also how Fed itself justifies its independence as you can see at their page here. Also for gauging the consensus among economists on central bank independence you can see this IGM poll amongst the top US economists (the poll is about political appointments - but that is all part of the whole Fed independence issue).