Italy, like Austria-Hungary, also wanted to be a Great Power. Unlike Austria-Hungary, Italy saw the road to this status in the scramble for Africa. (Austria-Hungary preferred to try its luck in the Balkans.)
This was the country, remember, that first attacked Abysinnia in 1895-6, losing, then finally succeeding in 1934-5. The Ottoman Empire was known (in the 19th and early 20th centuries) as the "Sick Man of Europe", except that it had holdings in North Africa. France had already taken away Morocco, Algeria, and Tunisia, leaving Libya for the Italians. This, they were able to do in 1912.
This happened because while Italy was "weak" compared to most other European countries including Austria-Hungary, it was "strong" compared to the Ottoman Empire.