but on the power bi service, its automatically changing the colours and the order how legend appears in desktop file - Any ideas on why this is happening ? and how to fix this ?
This appears to be a wonky bug in Power BI that keeps popping up. Check this extensive thread from the Microsoft Community with a bunch of different workarounds people have used to remedy this problem.