Why do houdini and stockfish give this seemingly stupid move? [fen "3r3k/1rp2p1p/4b2B/p3P1Q1/3q4/1P1P2P1/P4PBP/1R4K1 b - - 0 28"]


They both give Qxf2 as the best move. I used http://analysis.cpuchess.com/ with search time 10 seconds. It's black to move.
In the given position, Black ultimately has no way to avoid an impending checkmate, hence is lost no matter what. The engines you're consulting are just trying to push that unavoidable mate as far into the future as possible. 1...Qxf2+ does that the best; any other defensive tries lead to a quicker checkmate. For instance:

[Event "?"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "?"]
[Black "?"]
[Result "*"]
[FEN "3r3k/1rp2p1p/4b2B/p3P1Q1/3q4/1P1P2P1/P4PBP/1R4K1 b - - 0 28"]

1...Qxf2+ 
    ( 1...Rg8 2.Qf6+ Rg7 3.Qxg7# )
    ( 1...Qxe5 2.Qxd8# )
2.Kxf2 Rg8 3.Qf6+ Rg7 4.Qxg7# *