I'm pretty sure this is done by design and is not a bug. A cell reference inside a string will not evaluate literally. One way to get around this would be to write as
">"&B1
I think you're also going to have issues using the AND
function with the second argument. Instead, use AVERAGEIFS
which allows you to use multiple conditions for determining whether values should be included in the average. So your formula would be something like
=AVERAGEIFS('Sheet B'!B1:B365,'Sheet B'!A1:A365,">"&B1,'Sheet B'!A1:A365,"<"&C1)