Because she was a truth seeker who was no longer interested in idol worship.
The Gemorah in Sotah 12B says:
ותרד בת פרעה לרחוץ על היאור א"ר יוחנן משום ר' שמעון בן יוחי מלמד שירדה לרחוץ מגלולי אביה
“And the daughter of Pharaoh came down to bathe [lircḥotz] in the river” Rabbi Yoḥanan says in the name of Rabbi Shimon ben Yoḥai: This teaches that she came down to the river to cleanse herself from the impurity of her father’s idols
It is possible that at the time she was merely converting away from idol worship. Only later on in time did she convert to Judaism.
The Gemorah in Megilah 13A seems to imply that she did not convert to Judaism at the time she only rejected idol worship
ואלה בני בתיה בת פרעה אשר לקח מרד אמאי קרי לה יהודיה על שום שכפרה בע"ז דכתיב (שמות ב, ה) ותרד בת פרעה לרחוץ על היאור ואמר רבי יוחנן שירדה לרחוץ מגילולי בית אביה
Why was she [the daughter of Pharaoh] called a Jewess? Because she repudiated idolatry, as it is written, “And the daughter of Pharaoh went down to bathe in the river,” (Exodus 2:5) and R. Yohanan, [commenting on this,] said that ... she went down to cleanse herself from the idols of her father’s house.
There is no explicit reference in either Gemorah to her becoming Jewish at the time. She was called Jewish for rejecting idol worship.
(The Gemorah is clear that she did ultimately convert to Judaism. It continues on to say she married Kolaiv.)
While a life of luxury should not be a reason to not pursue truth, in any case, she doesn't seem to have given it up. She continued living in Pharos palace even afterward.