Why is the US funding its foes?

As Secretary of State John F. Kerry release $250 million in aid to Egypt, critics wonder why we're investing so much in a government that doesn't like the US