IX: On Philosophy and Friendship
These are the so-called “fair-weather” friendships; one who is chosen for the sake of utility will be satisfactory only so long as he is useful. Hence prosperous men are blockaded by troops of friends; but those who have failed stand amid vast loneliness, their friends fleeing from the very crisis which is to test their worth. Hence, also, we notice those many shameful cases of persons who, through fear, desert or betray. The beginning and the end cannot but harmonize. He who begins to be your friend because it pays will also cease because it pays.
Seneca Epistles 1-65, by Lucius Annaeus Seneca the Younger. Translation by Richard Gummere. Loeb Classical Library.