The error is largely due to order of operations and numeric class. You're working with a uint8 image. Tools like imfilter() will return an image of the same class as they're given, but internally, operations are done in floating point. That means you're dealing with the data being requantized on the output.
If you want to do a bunch of sequential operations on an image, it's best to cast the image as double before working on it, otherwise the rounding and truncation errors will keep stacking up. Cases where you're doing differences and sums between nominally similar images are a good example of where you can introduce errors. Your operation is I + a*(I - Igauss). Say a given pixel has the following theoretical result: 80 + 1*(80 - 100) = 60. If I and Igauss are both uint8, they can't have a negative difference, so the result is 80 instead.
It gets more complicated if the scaling factor is considered. If (I - Igauss) is negative and I and Igauss are uint8, the scaling factor will do nothing, since (in my example) the difference is truncated at zero.
Here's what you're starting with:
filtRadius = ceil(radius*2);
filtSize = 2*filtRadius + 1;
gaussFilt = fspecial('gaussian',[filtSize filtSize],radius);
sharpFilt = zeros(filtSize,filtSize);
sharpFilt(filtRadius+1,filtRadius+1) = 1;
sharpFilt = sharpFilt - gaussFilt;
sharpFilt = amount*sharpFilt;
sharpFilt(filtRadius+1,filtRadius+1) = sharpFilt(filtRadius+1,filtRadius+1) + 1;
B = imfilter(I,sharpFilt,'replicate','conv');
B1 = I + amount*(I - imfilter(I,gaussFilt,'replicate','conv'));
Now let's make one minor change
B = imfilter(I,sharpFilt,'replicate','conv');
B1 = I + amount*(I - imfilter(I,gaussFilt,'replicate','conv'));
That's a tiny error, but bear in mind, the error scale also corresponds to the change in scale that's characteristic with the change in numeric class. Eventually at the end of our workflow, we're (probably) going to convert back to uint8. What is the actual realized error on the output?
Note the change I made on the B1 line. Gotta keep your parameters in consistent use.