Federal direct loans and work study (the student contribution) are not hidden. Even the best financial aid colleges include some student contribution. This should be visible in net price calculators and actual financial aid offers.
Of course, the definition of “need” based on parental finances can vary from one college to another. Net price calculators can help estimate expected financial aid for many families, although those with complex financial situations may find many of them less reliable.
Actually, what you see here is a net price of $40,000 = parent contribution of $34,000 + student contribution of $6,000.
When colleges are trying to shape their admissions class with respect to financial aid need, they are not concerned about individual students. They may know that, based on past statistical analyses, that a large percentage of students from those private schools come from wealthy families, but a smaller percentage come from less wealthy families and attended on financial aid or scholarships there, so that they have a decent idea of what to expect from a financial aid need standpoint when they admit a number of students from those private schools.