The intervals F-B and B-F are called Augmented Fourth and Diminished Fifth respectively, but they are really both the same interval - a tritone.
Why are they named differently?
when they both are the same interval,
They are not the same interval. Diminished 5th and Augmented 4th are called enharmonic equivalents, not the same interval. The fact that they have the same chromatic distance between them - a tritone - does not make them the same interval in our musical vocabulary. A tritone is sometimes called an interval, but technically the term tritone is not a proper name for an interval.
The naming of intervals is not dependent on the objective chromatic distance between notes, but must take into account the scale being spelled. Interval names represent the relationship of a given note to the scale in question. Interval names are relative, not absolute.
If you are spelling F Major, B is an Augmented 4th, because the scale's perfect 4th is Bb.
B is still a 4th in the scale, counting F:1,G:2,A:3,B:4, but since B is increased by one half step in size relative to the scale's perfect 4th Bb, it now becomes an Augmented - Enlarged - 4th, relative to the Perfect 4th of the F Major Scale.
However, if you are spelling B Major, the scale's perfect 5th is F#.
F is still a 5th, counting B:1,C:2,D:3,E:4,F:5 But since F is reduced by one half step in size relative to the perfect 5th F#, it now becomes a Diminished - Reduced - 5th, relative to the perfect 5th of the B Major Scale.
And MUCH MORE in @Dom 's accepted answer here: Why do notes have multiple names?
Most, if not all, intervals have two names, generally speaking. An interval is the space between two notes. Because any given note will have at least two names, the naming of the interval will end up with at least two differences.
Let's take D>F#, a simple major 3rd. It revolves around counting up from bottom to top note. So, D,E,F gives it a third. Because there are 4 semitones involved, it's a major 3rd. Call that F# Gb, and now, there is D,E,F,G - a 4th. But because there are 4 semitones involved, it gets called a diminished 4th. Same sounds, technically different names.
Onto your tritone - 3 tones, or 6 semitones. The same space, but from what letter names?
Taking your B>F. B,C,D,E,F. 5 letter names, therefore a 5th. 6 semitones, therefore a diminished 5th. (One semitone smaller than P4 = dim5). F>B. F,G,A,B. 4 letter names, so a 4th. 6 semitones, so an augmented 4th.(One semitone wider than a P5 =aug5).
Stinkfoot is correct, they are not the same interval. They sound the same, they are played in the same place on pretty well every instrument, but their names, aka intervals, are different. Suppose it's semantics.
For the same sort of reason that 'their' and 'there' sound the same but are spelled differently and have different meanings.
Note that, just as in language, music supports puns. We can have musical fun with the fact that a diminished fifth is the same sound as an augmented fourth. It opens the door to chord substitutions in jazz harmony, to the diminished 7th chord as a method of modulating to remote keys...