After filing a IFR flight from Halfmoon Bay, CA (KHAF) to San Jose Intl., CA (KSJC) curse Alt: 5,000 feet, ATC gives clearance with Altitude 3,000 Feet, ATC then reassigns Altitudes to 2,000 feet which is too low to clear terrain which cause you to fly into the mountain. The Approach plate shows an MSA 25NM circle around airport to fly at 5500 feet to clear all terrain. Wondering if this is an error in programing.