The Cuban intervention in Angola was entirely in keeping with the regime's outlook since the revolution. C. Sobers, in Investigating Cuban Internationalism: the First Angolan Intervention, 1975, observes that
The Angolan intervention culminated a decade of interest in African
affairs, and was a prime example of Cuban internationalism. Cuban
internationalism denotes the duty of every Cuban to support fellow
revolutionary movements in Latin America and beyond. It is virtually
impossible to view Cuban foreign policy except through the prism of
its recent revolutionary past. This is not just a western conceit,
born of the fifty-year adversarial relationship between the Cuba and
the United States. Rather, the Cuban government has explicitly
historicized, conceptualized and projected its image as that of a
revolutionary state and, that most elusive category, a revolutionary
power. Necessary to the goal of being a revolutionary power is an
explicit commitment to the projection of power and influence –
military, economic, ideological – known in the Cuban context as
‘internacionalismo’.
Source: Chapter 17 in Alessandra Lorini and Duccio Basosi (eds), 'Cuba in the World, the World in Cuba' (2009) (link downloads pdf)
Initial Cuban attempts at 'exporting' revolution had largely been confined to its own region, Latin America:
Both internal concerns and idealism were guiding Cuba’s stance on
exporting revolution, not only by example but also by direct Cuban
involvement. Assistance to various Latin American insurgencies thus
became a priority of Castro’s agenda.... By the end of 1964, however, Castro had become
disillusioned with the Latin American field and decided to turn his
attention towards a new theatre of intervention: Africa.
Source: M. S. Rognoni, 'Cuba and Angola in the 1970s: War, Revolution and Nation-Building', Chapter 18 in Alessandra Lorini and Duccio Basosi (eds)
Castro's turning to Africa was the natural course to take if the Cuban regime was to continue to pursue its internacionalismo policy:
Historically, the legacy of the transatlantic slave trade gave Cuba a
substantial African demographic, many of whom were from the region
that became Angola. More important, the MPLA’s socialist credentials
were beyond reproach. Leader Agostinho Neto was an established Marxist
intellectual and poet, and a personal friend of the Castro brothers.
Source: C. Sobers
Sobers also notes that:
Since 1959 Cuban rhetoric and policy reflected a strong commitment to
anticolonialism and antiracism, influenced largely by Cuba’s own
experience of Spanish colonisation and US imperialism. Despite the
vagaries of the liberation parties, at its root the Angolan crisis was
an anticolonial struggle of national liberation, made more acute by
the collusion of South Africa and the CIA and presence of the SADF on
Angolan territory. Cuba also had a socialist imperative to support the
oppressed classes in the spirit of Marxist “proletarian
internationalism”
Angola was not Cuba's first African intervention; she had sent military aid to the then communist African Party for the Independence of Guinea and Cape Verde (PAIGC) during the Guinea-Bissau War of Independence from the mid 1960s. By then, links with the People's Movement for the Liberation of Angola (MPLA) had already been established.
As Portuguese rule in Angola was coming to end, the MPLA - although the most widely-supported party - was not the strongest faction militarily. The Soviets, however, were reluctant to send troops and risk a direct confrontation with the US so it was effectively left to Cuba to take the initiative:
Unwilling to upset a tenuous d´etente with the United States, Moscow
had refused to supply Soviet troops – or to airlift Cuban soldiers –
until after Independence Day, which according to the Alvor Accord
would be on November 11. As the agreement disintegrated, it became
clear that whoever controlled the capital on Independence Day would
determine the government. Convinced that South Africa would take
Luanda before November 11 unless impeded by outside forces, Havana was
unwilling to wait. On October 23, Cuban soldiers participated in the
fighting for the first time.
Source: Elizabeth Schmidt, 'Foreign Intervention in Africa' (CUP, 2013)