The famous gemara in Avodah Zara:
א"ר אין אדם לומד תורה אלא ממקום שלבו חפץ שנאמר (תהלים א, ב) כי אם בתורת ה' חפצו
Rabbi [Yehuda HaNasi] says: A person can learn Torah only from a place [in the Torah] that his heart desires, as it is stated: But his delight is in the Torah of the Lord [i.e. his delight is in the part of the Torah that he wishes to study]. (R Steinsaltz translation/commentary)
Sounds like it is phrased as an obligation to only study what one enjoys. Rava clarifies a bit further on:
אמר רבא לעולם ילמוד אדם תורה במקום שלבו חפץ שנאמר כי אם בתורת ה' חפצו
A person should always learn Torah from a place [in the Torah] that his heart desires, as it is stated: “But his delight is in the Torah of the Lord.” (R Steinsaltz translation/commentary)
I see no commentaries that view this as a halacha, nor any halachic connections to this gemara. The gemara does bring an alternative opinion, I would note.
Is there any level of obligation on this principle? If not why is it phrased as such?