I think the reason is that fMRI really stands for "functional MRI" rather than for "functional magnetic resonance imaging". That may sound like a distinction without a difference (since MRI stands for "magnetic resonance imaging"), but acronyms and initialisms tend to take on a life of their own. (For example, we wouldn't say *"a magnetic resonance imaging", but "an MRI" is well-attested in reference to an individual scan or an individual machine.) Analogous cases, as noted in comments above and in the question that Gary links to, include mRNA ("messenger RNA") and hPSC ("human PSC").
That said, most similar abbreviations actually don't take this approach. Usually the added letter isn't set off at all (such that a neonatal ICU is a NICU and a hash-based MAC is an HMAC); occasionally it's set off with a hyphen (such that transfer DNA is T-DNA and Broadband ISDN is B-ISDN). I don't think there's any specific factor that leads to one approach or another, other than the personal preference of the people introducing the terms.