I don't believe the reason was ideological. Oswald was a confused man who wanted to be more important than he was. Everything he did seemed to be aimed at making himself a figure people would notice. Sadly he succeeded. Infamy is the same as fame to that sort of mentality.