Faustian Bargain, idiomatic,
An agreement in which a person abandons his or her spiritual values or moral principles in order to obtain knowledge, wealth or other benefits.
A deal in which one focuses on present gain without considering the long term consequences.