The DLPF of mpu6050 is not in "default on" mode while dealing with the raw values from the sensor. You have to turn it on in order to make sense of the raw values. If you look carefully at the Raw example code, mpu6050.h is added as a header file.
In that file , you will see this section is present:
void MPU6050::setDLPFMode(uint8_t mode) {
I2Cdev::writeBits(devAddr, MPU6050_RA_CONFIG, MPU6050_CFG_DLPF_CFG_BIT, MPU6050_CFG_DLPF_CFG_LENGTH, mode);
}
So in your Raw example code you will turn on the dlpf by using this command just after the initialization: accelgyro.setDLPFMode(MPU6050_DLPF_BW_42);