Hello, Alex8!
Thank you for the interesting question!
You are certainly right. The main idea of these two lines is the same – to develop the light-squared bishop. Then black usually does not hesitate to get rid of it. But the way he does it is a bit different. In the line 4 ..Bg4 black gives the bishop instantly – after both 5. h3 Bxf3 (in case of 5. ..Bh5 white can continue by 6. g4 Bg6 7. Ne5 or play, for example, a simple 6. Nbd2) 6. Qxf3 and 5. cxd5 Bxf3 6. Qxf3 cxd5 – the first line gives more promising advantage for white.
In the line 4 ..Bf5 black tries to be not so complaisant. White has to do some work to get this bishop and sometimes his actions might give black some benefit as well – such as a possibility to exchange queens (Qb3 – Qb6) or a counter chances on the K-side, which might already be weakened by the brave g-pawn advance.
Black is just trying to put more problems for the opponent. White has a wide choice – it is also a kind of problem. White has to play more ambitiously, all over the board. It is not so bad if your opponent has to keep many things under control – he is a human after all and the clocks are ticking…
I hope these brief explanations were useful but please don’t take them too seriously – it’s just a point of view of the player, who is not a great expert in this particular line. It would be interesting to ask, for example, GM Pavel Tregubov, who beats black every time he faces both of these lines on the board. Once yours truly decided to take a free lesson from him and played the line 4. ..Bf5 5. Nc3 e6 6. Nh4 Be4 etc. – it was really instructive but unfortunately has not added any points to my score in the tournament.
Good luck!
Ruslan