It's because of the stress patterns.
'Capability' is based on the adjective 'capable'. In both these words, the first syllable, 'cap', is long because it is stressed:
/ˈkeɪpəb(ə)l/ and /keɪpəˈbɪlɪti/. The first syllable bears the primary stress in 'capable' and the secondary stress in 'capability'.
'Capacity' has the stress on the second syllable: /kəˈpasɪti/. The first syllable, 'cap', is unstressed and is therefore weakened to a schwa sound /ə/.
A couple of things to bear in mind:
Unstressed syllables are nearly always realised as either a schwa /ə/ - a very short, weak 'uh' sound - or a short /ɪ/. This is why the 'cap' in 'capacity' is pronounced as a short, weak /kəp/ as opposed to the stressed /keɪp/ of 'capable' ( or even the stressed 'a' sound in the one-syllable word 'cap', as in 'hat').
Remember that the spelling of English words is based on their etymology : the words 'capability' and 'capacity' are both derived from the Latin <em>capere</em>, meaning to take or hold: this is why they look similar when they are written down. Spellings tell us what the origins of the word are; they do not necessarily tell us exactly how to say it. Pronunciation is determined by the rules of phonology, including issues of stress patterns. The fact that two words have similar spellings does not necessarily mean that they have the same pronunciation. Likewise, the fact that two words sound the same does not necessarily mean that they are written the same way.