Let $\{V_a\}$ be an open cover of $f(X)$. Since $f$ is continuous, we know that each of the sets $f^{-1}(V_a)$ is open. Since $X$ is compact, there are finitely many indices $a_1,...,a_n$ such that $$X\subset f^{-1}(V_{a_1})\cup \cdots\cup f^{-1}(V_{a_n}).$$ Since $f(f^{-1}(E))\subset E$ for every $E\subset Y$, the above implies that $$f(X)\subset V_{a_1}\cup \cdots\cup V_{a_n}.$$ Hence, $f(X)$ is compact.
What you give as the definition of compact set is actually the definition of sequentially compact set; the two properties are equivalent in metric spaces but not in general. In general a set $K$ in a topological space $X$ is compact if every open cover of $K$ has a finite subcover. This means that if $\mathscr{U}$ is a family of open sets such that $K\subseteq\bigcup\mathscr{U}$ (i.e., $\mathscr{U}$ is an open cover of $K$), then there is a finite subcollection $\mathscr{U}_0\subseteq\mathscr{U}$ such that $K\subseteq\bigcup\mathscr{U}_0$. This no longer looks at all like the definition of a perfect set.
Your definition of perfect set is correct: $P$ is perfect if $P=P'$. In Hausdorff spaces (and hence certainly in metric spaces) this is equivalent to saying that $P$ is an infinite closed set with no isolated points.
Even in metric spaces the two are definitely not the same. This can already be seen in the familiar space $\Bbb R$. The set
$$S=\{0\}\cup\left\{\frac1n:n\in\Bbb Z^+\right\}\;,$$
for example, is an infinite compact subset of $\Bbb R$ that is certainly not perfect: $S$ consists mostly of isolated points, and $S'=\{0\}$. On the other hand, $\Bbb R$ itself is a perfect subset of $\Bbb R$ that is not compact. The closed ray $[0,\to)$ is another, as is
$$\bigcup_{n\in\Bbb Z}[2n,2n+1]=\ldots\cup[-4,-3]\cup[-2,-1]\cup[0,1]\cup[2,3]\cup[4,5]\cup\ldots\,\;.$$
What is true in $\Bbb R$ (and in fact in $\Bbb R^n$ for all $n$) is that every uncountable closed set contains a perfect subset.
Best Answer
The main reason why "compactness" is not defined this way is that it has meaning in more general spaces than $\mathbb{R}$. The concepts of "sequences", "subsequences", and "convergence" can be talked about in more general settings, as indeed can the terms "closed" and "bounded", but as we generalise, we find that closed and bounded sets are not always compact (though the converse happens to be true).
When we do look at generalisations, the definition with sequences and subsequences turns out to be the more natural definition. It's the definition you use, for example, when proving fundamental real analysis theorems like the extreme value theorem. Proving it directly just from closedness and boundedness is messy, tricky, and uses copious amounts of the supremum axiom, whereas using compactness is elegant. And, indeed, the extreme value theorem works in these more general spaces too, provided you define compactness in terms of sequences.
If you want to know more about these more general spaces, you can look up "metric spaces". Basically, a metric space is a set with a function that takes two points in the set, and spits out a positive number that could be interpreted as a distance between these points. From this, there are natural definitions of convergence, closedness, and boundedness, etc.
I should also point out that there is a further generalisation, called topological spaces, but these are far more abstract. In this setting, there is actually another, different definition for compactness, which turns out to be more useful (but still, the extreme value theorem holds!).