IN terms of the federal student loans, you can thank congress for most of the rates you see fixed at/around 6.8%. Up until 2013 stafford loans (the most common type of federal student loans) were set at whatever rate congress approved until they decided to pass new legislation changing the rate to something else. From 2006 until 2013 the rate was fixed at 6.8%, even though the market rate plummeted during this time period. Also, up until the 2010 student loan reforms passed by congress and Obama, most federal student loans were actually dispersed through 3rd party lenders, who often bought and sold each otehrs loans much in the way that they did with mortgages. Turns out this was a really bad idea and led to all sorts of problems.
Nowadays student loans match the 10y Treasure bills + 2.05% at the time the loan is taken out (they use the rate on July 1st of each year). For the 2016-2017 school year the rate is set at 3.76% The federal government is also the sole distributor of loans (via www. studentloans.gov) This has been true only since 2013.
Once you exit school and enter repayment you can refinance and/or consolidate your loans with a private lender. Often this will lead to lower rates, but people being the stupid creatures we are with debt, some will instead choose an extended payoff plan or cash-up-front instead of the lower interest rate option because they see immediate benefits upfront and fail to appreciate that they will pay butt-loads more over time.