Many organisations are bound by what is allowed to cross their borders. For example: in Swiss banks, there are strong controls in place to make sure no data leaves Switzerland.
This is a consideration for code too, as code contributed to GitHub is data leaving the organisation and there may be requirements around these obligations.
Another example of why preventing contributions with "test data" in them may be good policy.